# Generated from HogQLParser.g4 by ANTLR 4.13.2
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO

def serializedATN():
    return [
        4,1,160,1303,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,
        7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,
        13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,
        20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,
        26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,
        33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,
        39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,
        46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,
        52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,
        59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,
        65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,
        72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,
        78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,
        85,7,85,1,0,5,0,174,8,0,10,0,12,0,177,9,0,1,0,1,0,1,1,1,1,3,1,183,
        8,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,192,8,3,1,4,1,4,1,4,5,4,197,
        8,4,10,4,12,4,200,9,4,1,4,3,4,203,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,
        5,1,5,1,5,1,5,1,5,1,5,3,5,217,8,5,1,6,1,6,3,6,221,8,6,1,6,3,6,224,
        8,6,1,7,1,7,3,7,228,8,7,1,7,3,7,231,8,7,1,8,1,8,1,8,1,8,1,8,3,8,
        238,8,8,1,8,1,8,3,8,242,8,8,1,8,1,8,1,9,1,9,1,9,5,9,249,8,9,10,9,
        12,9,252,9,9,1,9,1,9,3,9,256,8,9,1,10,1,10,1,10,1,10,1,10,1,10,1,
        10,3,10,265,8,10,1,11,1,11,1,11,1,11,1,11,1,11,3,11,273,8,11,1,12,
        1,12,1,12,1,12,1,12,3,12,280,8,12,1,12,1,12,3,12,284,8,12,1,12,1,
        12,1,12,1,12,3,12,290,8,12,1,12,1,12,1,12,3,12,295,8,12,1,13,1,13,
        1,13,1,13,1,13,1,13,3,13,303,8,13,1,13,1,13,1,13,1,13,1,13,3,13,
        310,8,13,1,14,1,14,1,14,1,14,3,14,316,8,14,1,14,1,14,1,14,1,15,1,
        15,1,15,1,15,1,15,1,16,1,16,3,16,328,8,16,1,17,1,17,1,18,1,18,5,
        18,334,8,18,10,18,12,18,337,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,
        20,1,20,1,20,5,20,348,8,20,10,20,12,20,351,9,20,1,20,3,20,354,8,
        20,1,21,1,21,1,21,3,21,359,8,21,1,21,1,21,1,22,1,22,1,22,1,22,5,
        22,367,8,22,10,22,12,22,370,9,22,1,23,1,23,1,23,1,23,1,23,1,23,3,
        23,378,8,23,1,24,3,24,381,8,24,1,24,1,24,3,24,385,8,24,1,24,3,24,
        388,8,24,1,24,1,24,3,24,392,8,24,1,24,3,24,395,8,24,1,24,3,24,398,
        8,24,1,24,3,24,401,8,24,1,24,3,24,404,8,24,1,24,1,24,3,24,408,8,
        24,1,24,1,24,3,24,412,8,24,1,24,3,24,415,8,24,1,24,3,24,418,8,24,
        1,24,3,24,421,8,24,1,24,1,24,3,24,425,8,24,1,24,3,24,428,8,24,1,
        25,1,25,1,25,1,26,1,26,1,26,1,26,3,26,437,8,26,1,27,1,27,1,27,1,
        28,3,28,443,8,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,
        29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,462,8,29,10,29,12,29,
        465,9,29,1,30,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,
        1,32,1,32,1,32,3,32,481,8,32,1,33,1,33,1,33,1,34,1,34,1,34,1,34,
        1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,3,36,498,8,36,1,36,1,36,
        1,36,1,36,3,36,504,8,36,1,36,1,36,1,36,1,36,3,36,510,8,36,1,36,1,
        36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,521,8,36,3,36,523,8,36,
        1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,3,39,534,8,39,1,39,
        3,39,537,8,39,1,39,1,39,1,39,1,39,3,39,543,8,39,1,39,1,39,1,39,1,
        39,1,39,1,39,3,39,551,8,39,1,39,1,39,1,39,1,39,5,39,557,8,39,10,
        39,12,39,560,9,39,1,40,3,40,563,8,40,1,40,1,40,1,40,3,40,568,8,40,
        1,40,3,40,571,8,40,1,40,3,40,574,8,40,1,40,1,40,3,40,578,8,40,1,
        40,1,40,3,40,582,8,40,1,40,3,40,585,8,40,3,40,587,8,40,1,40,3,40,
        590,8,40,1,40,1,40,3,40,594,8,40,1,40,1,40,3,40,598,8,40,1,40,3,
        40,601,8,40,3,40,603,8,40,3,40,605,8,40,1,41,1,41,1,41,3,41,610,
        8,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,621,8,42,
        1,43,1,43,1,43,1,43,3,43,627,8,43,1,44,1,44,1,44,5,44,632,8,44,10,
        44,12,44,635,9,44,1,45,1,45,3,45,639,8,45,1,45,1,45,3,45,643,8,45,
        1,45,1,45,3,45,647,8,45,1,46,1,46,1,46,1,46,3,46,653,8,46,3,46,655,
        8,46,1,47,1,47,1,47,5,47,660,8,47,10,47,12,47,663,9,47,1,48,1,48,
        1,48,1,48,1,49,3,49,670,8,49,1,49,3,49,673,8,49,1,49,3,49,676,8,
        49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,53,1,
        53,1,53,1,53,1,53,1,53,3,53,695,8,53,1,54,1,54,1,54,1,54,1,54,1,
        54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,709,8,54,1,55,1,55,1,55,1,
        56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,723,8,56,10,56,12,
        56,726,9,56,1,56,3,56,729,8,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,
        5,56,738,8,56,10,56,12,56,741,9,56,1,56,3,56,744,8,56,1,56,1,56,
        1,56,1,56,1,56,1,56,1,56,5,56,753,8,56,10,56,12,56,756,9,56,1,56,
        3,56,759,8,56,1,56,1,56,1,56,1,56,1,56,3,56,766,8,56,1,56,1,56,3,
        56,770,8,56,1,57,1,57,1,57,5,57,775,8,57,10,57,12,57,778,9,57,1,
        57,3,57,781,8,57,1,58,1,58,1,58,3,58,786,8,58,1,58,1,58,1,58,1,58,
        1,58,4,58,793,8,58,11,58,12,58,794,1,58,1,58,3,58,799,8,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,823,8,58,1,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        3,58,840,8,58,1,58,1,58,1,58,1,58,3,58,846,8,58,1,58,3,58,849,8,
        58,1,58,3,58,852,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,
        58,862,8,58,1,58,1,58,1,58,1,58,3,58,868,8,58,1,58,3,58,871,8,58,
        1,58,3,58,874,8,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,882,8,58,1,
        58,3,58,885,8,58,1,58,1,58,3,58,889,8,58,1,58,3,58,892,8,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,906,
        8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,1,58,1,58,3,58,923,8,58,1,58,1,58,1,58,3,58,928,8,58,1,58,1,
        58,1,58,3,58,933,8,58,1,58,1,58,1,58,1,58,3,58,939,8,58,1,58,1,58,
        1,58,1,58,1,58,3,58,946,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,1,58,1,58,3,58,958,8,58,1,58,1,58,3,58,962,8,58,1,58,3,58,965,
        8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,974,8,58,1,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,988,8,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,3,58,1004,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
        1,58,1,58,1,58,1,58,1,58,3,58,1033,8,58,1,58,1,58,1,58,1,58,1,58,
        1,58,3,58,1041,8,58,5,58,1043,8,58,10,58,12,58,1046,9,58,1,59,1,
        59,1,59,1,59,5,59,1052,8,59,10,59,12,59,1055,9,59,1,59,3,59,1058,
        8,59,1,59,1,59,1,59,1,59,1,59,5,59,1065,8,59,10,59,12,59,1068,9,
        59,1,59,3,59,1071,8,59,1,59,1,59,3,59,1075,8,59,1,59,1,59,1,59,3,
        59,1080,8,59,1,60,1,60,1,60,5,60,1085,8,60,10,60,12,60,1088,9,60,
        1,60,1,60,1,60,1,60,1,60,1,60,5,60,1096,8,60,10,60,12,60,1099,9,
        60,1,60,1,60,1,60,1,60,1,60,1,60,3,60,1107,8,60,1,60,1,60,1,60,1,
        60,1,60,3,60,1114,8,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
        61,1,61,1,61,3,61,1127,8,61,1,62,1,62,1,62,5,62,1132,8,62,10,62,
        12,62,1135,9,62,1,62,3,62,1138,8,62,1,63,1,63,1,63,1,63,1,63,1,63,
        1,63,1,63,1,63,1,63,3,63,1150,8,63,1,64,1,64,1,64,1,64,3,64,1156,
        8,64,1,64,3,64,1159,8,64,1,65,1,65,1,65,5,65,1164,8,65,10,65,12,
        65,1167,9,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,1178,
        8,66,1,66,1,66,1,66,1,66,3,66,1184,8,66,5,66,1186,8,66,10,66,12,
        66,1189,9,66,1,67,1,67,1,67,3,67,1194,8,67,1,67,1,67,1,68,1,68,1,
        68,3,68,1201,8,68,1,68,1,68,1,69,1,69,1,69,5,69,1208,8,69,10,69,
        12,69,1211,9,69,1,69,3,69,1214,8,69,1,70,1,70,1,71,1,71,1,71,1,71,
        1,71,1,71,3,71,1224,8,71,3,71,1226,8,71,1,72,3,72,1229,8,72,1,72,
        1,72,1,72,1,72,1,72,1,72,3,72,1237,8,72,1,73,1,73,1,73,3,73,1242,
        8,73,1,74,1,74,1,75,1,75,1,76,1,76,1,77,1,77,3,77,1252,8,77,1,78,
        1,78,1,78,3,78,1257,8,78,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,
        1,81,1,81,3,81,1269,8,81,1,82,1,82,5,82,1273,8,82,10,82,12,82,1276,
        9,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,3,83,1285,8,83,1,84,1,84,
        5,84,1289,8,84,10,84,12,84,1292,9,84,1,84,1,84,1,85,1,85,1,85,1,
        85,1,85,3,85,1301,8,85,1,85,0,3,78,116,132,86,0,2,4,6,8,10,12,14,
        16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,
        60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,
        102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,
        134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,
        166,168,170,0,17,2,0,31,31,36,36,2,0,18,18,75,75,2,0,45,45,52,52,
        3,0,1,1,4,4,8,8,4,0,1,1,3,4,8,8,81,81,2,0,52,52,74,74,2,0,1,1,4,
        4,2,0,7,7,22,23,2,0,30,30,50,50,2,0,72,72,77,77,3,0,10,10,51,51,
        91,91,2,0,42,42,54,54,1,0,108,109,2,0,119,119,140,140,7,0,21,21,
        39,39,56,57,71,71,79,79,98,98,104,104,17,0,1,13,15,20,22,28,30,30,
        32,35,37,38,40,43,45,52,54,55,59,59,61,70,72,78,80,84,86,93,95,97,
        99,100,102,103,4,0,20,20,30,30,40,40,49,49,1475,0,175,1,0,0,0,2,
        182,1,0,0,0,4,184,1,0,0,0,6,186,1,0,0,0,8,193,1,0,0,0,10,216,1,0,
        0,0,12,218,1,0,0,0,14,225,1,0,0,0,16,232,1,0,0,0,18,245,1,0,0,0,
        20,257,1,0,0,0,22,266,1,0,0,0,24,274,1,0,0,0,26,296,1,0,0,0,28,311,
        1,0,0,0,30,320,1,0,0,0,32,325,1,0,0,0,34,329,1,0,0,0,36,331,1,0,
        0,0,38,340,1,0,0,0,40,344,1,0,0,0,42,358,1,0,0,0,44,362,1,0,0,0,
        46,377,1,0,0,0,48,380,1,0,0,0,50,429,1,0,0,0,52,432,1,0,0,0,54,438,
        1,0,0,0,56,442,1,0,0,0,58,448,1,0,0,0,60,466,1,0,0,0,62,469,1,0,
        0,0,64,472,1,0,0,0,66,482,1,0,0,0,68,485,1,0,0,0,70,489,1,0,0,0,
        72,522,1,0,0,0,74,524,1,0,0,0,76,527,1,0,0,0,78,542,1,0,0,0,80,604,
        1,0,0,0,82,609,1,0,0,0,84,620,1,0,0,0,86,622,1,0,0,0,88,628,1,0,
        0,0,90,636,1,0,0,0,92,654,1,0,0,0,94,656,1,0,0,0,96,664,1,0,0,0,
        98,669,1,0,0,0,100,677,1,0,0,0,102,681,1,0,0,0,104,685,1,0,0,0,106,
        694,1,0,0,0,108,708,1,0,0,0,110,710,1,0,0,0,112,769,1,0,0,0,114,
        771,1,0,0,0,116,932,1,0,0,0,118,1074,1,0,0,0,120,1113,1,0,0,0,122,
        1126,1,0,0,0,124,1128,1,0,0,0,126,1149,1,0,0,0,128,1158,1,0,0,0,
        130,1160,1,0,0,0,132,1177,1,0,0,0,134,1190,1,0,0,0,136,1200,1,0,
        0,0,138,1204,1,0,0,0,140,1215,1,0,0,0,142,1225,1,0,0,0,144,1228,
        1,0,0,0,146,1241,1,0,0,0,148,1243,1,0,0,0,150,1245,1,0,0,0,152,1247,
        1,0,0,0,154,1251,1,0,0,0,156,1256,1,0,0,0,158,1258,1,0,0,0,160,1262,
        1,0,0,0,162,1268,1,0,0,0,164,1270,1,0,0,0,166,1284,1,0,0,0,168,1286,
        1,0,0,0,170,1300,1,0,0,0,172,174,3,2,1,0,173,172,1,0,0,0,174,177,
        1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,0,176,178,1,0,0,0,177,175,
        1,0,0,0,178,179,5,0,0,1,179,1,1,0,0,0,180,183,3,6,3,0,181,183,3,
        10,5,0,182,180,1,0,0,0,182,181,1,0,0,0,183,3,1,0,0,0,184,185,3,116,
        58,0,185,5,1,0,0,0,186,187,5,53,0,0,187,191,3,156,78,0,188,189,5,
        116,0,0,189,190,5,123,0,0,190,192,3,4,2,0,191,188,1,0,0,0,191,192,
        1,0,0,0,192,7,1,0,0,0,193,198,3,156,78,0,194,195,5,117,0,0,195,197,
        3,156,78,0,196,194,1,0,0,0,197,200,1,0,0,0,198,196,1,0,0,0,198,199,
        1,0,0,0,199,202,1,0,0,0,200,198,1,0,0,0,201,203,5,117,0,0,202,201,
        1,0,0,0,202,203,1,0,0,0,203,9,1,0,0,0,204,217,3,12,6,0,205,217,3,
        14,7,0,206,217,3,18,9,0,207,217,3,20,10,0,208,217,3,22,11,0,209,
        217,3,26,13,0,210,217,3,24,12,0,211,217,3,28,14,0,212,217,3,30,15,
        0,213,217,3,36,18,0,214,217,3,32,16,0,215,217,3,34,17,0,216,204,
        1,0,0,0,216,205,1,0,0,0,216,206,1,0,0,0,216,207,1,0,0,0,216,208,
        1,0,0,0,216,209,1,0,0,0,216,210,1,0,0,0,216,211,1,0,0,0,216,212,
        1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217,11,1,
        0,0,0,218,220,5,73,0,0,219,221,3,4,2,0,220,219,1,0,0,0,220,221,1,
        0,0,0,221,223,1,0,0,0,222,224,5,151,0,0,223,222,1,0,0,0,223,224,
        1,0,0,0,224,13,1,0,0,0,225,227,5,85,0,0,226,228,3,4,2,0,227,226,
        1,0,0,0,227,228,1,0,0,0,228,230,1,0,0,0,229,231,5,151,0,0,230,229,
        1,0,0,0,230,231,1,0,0,0,231,15,1,0,0,0,232,241,5,14,0,0,233,234,
        5,131,0,0,234,237,3,156,78,0,235,236,5,116,0,0,236,238,3,156,78,
        0,237,235,1,0,0,0,237,238,1,0,0,0,238,239,1,0,0,0,239,240,5,150,
        0,0,240,242,1,0,0,0,241,233,1,0,0,0,241,242,1,0,0,0,242,243,1,0,
        0,0,243,244,3,36,18,0,244,17,1,0,0,0,245,246,5,94,0,0,246,250,3,
        36,18,0,247,249,3,16,8,0,248,247,1,0,0,0,249,252,1,0,0,0,250,248,
        1,0,0,0,250,251,1,0,0,0,251,255,1,0,0,0,252,250,1,0,0,0,253,254,
        5,29,0,0,254,256,3,36,18,0,255,253,1,0,0,0,255,256,1,0,0,0,256,19,
        1,0,0,0,257,258,5,41,0,0,258,259,5,131,0,0,259,260,3,4,2,0,260,261,
        5,150,0,0,261,264,3,10,5,0,262,263,5,25,0,0,263,265,3,10,5,0,264,
        262,1,0,0,0,264,265,1,0,0,0,265,21,1,0,0,0,266,267,5,101,0,0,267,
        268,5,131,0,0,268,269,3,4,2,0,269,270,5,150,0,0,270,272,3,10,5,0,
        271,273,5,151,0,0,272,271,1,0,0,0,272,273,1,0,0,0,273,23,1,0,0,0,
        274,275,5,33,0,0,275,279,5,131,0,0,276,280,3,6,3,0,277,280,3,30,
        15,0,278,280,3,4,2,0,279,276,1,0,0,0,279,277,1,0,0,0,279,278,1,0,
        0,0,279,280,1,0,0,0,280,281,1,0,0,0,281,283,5,151,0,0,282,284,3,
        4,2,0,283,282,1,0,0,0,283,284,1,0,0,0,284,285,1,0,0,0,285,289,5,
        151,0,0,286,290,3,6,3,0,287,290,3,30,15,0,288,290,3,4,2,0,289,286,
        1,0,0,0,289,287,1,0,0,0,289,288,1,0,0,0,289,290,1,0,0,0,290,291,
        1,0,0,0,291,292,5,150,0,0,292,294,3,10,5,0,293,295,5,151,0,0,294,
        293,1,0,0,0,294,295,1,0,0,0,295,25,1,0,0,0,296,297,5,33,0,0,297,
        298,5,131,0,0,298,299,5,53,0,0,299,302,3,156,78,0,300,301,5,117,
        0,0,301,303,3,156,78,0,302,300,1,0,0,0,302,303,1,0,0,0,303,304,1,
        0,0,0,304,305,5,43,0,0,305,306,3,4,2,0,306,307,5,150,0,0,307,309,
        3,10,5,0,308,310,5,151,0,0,309,308,1,0,0,0,309,310,1,0,0,0,310,27,
        1,0,0,0,311,312,7,0,0,0,312,313,3,156,78,0,313,315,5,131,0,0,314,
        316,3,8,4,0,315,314,1,0,0,0,315,316,1,0,0,0,316,317,1,0,0,0,317,
        318,5,150,0,0,318,319,3,36,18,0,319,29,1,0,0,0,320,321,3,4,2,0,321,
        322,5,116,0,0,322,323,5,123,0,0,323,324,3,4,2,0,324,31,1,0,0,0,325,
        327,3,4,2,0,326,328,5,151,0,0,327,326,1,0,0,0,327,328,1,0,0,0,328,
        33,1,0,0,0,329,330,5,151,0,0,330,35,1,0,0,0,331,335,5,129,0,0,332,
        334,3,2,1,0,333,332,1,0,0,0,334,337,1,0,0,0,335,333,1,0,0,0,335,
        336,1,0,0,0,336,338,1,0,0,0,337,335,1,0,0,0,338,339,5,148,0,0,339,
        37,1,0,0,0,340,341,3,4,2,0,341,342,5,116,0,0,342,343,3,4,2,0,343,
        39,1,0,0,0,344,349,3,38,19,0,345,346,5,117,0,0,346,348,3,38,19,0,
        347,345,1,0,0,0,348,351,1,0,0,0,349,347,1,0,0,0,349,350,1,0,0,0,
        350,353,1,0,0,0,351,349,1,0,0,0,352,354,5,117,0,0,353,352,1,0,0,
        0,353,354,1,0,0,0,354,41,1,0,0,0,355,359,3,44,22,0,356,359,3,48,
        24,0,357,359,3,120,60,0,358,355,1,0,0,0,358,356,1,0,0,0,358,357,
        1,0,0,0,359,360,1,0,0,0,360,361,5,0,0,1,361,43,1,0,0,0,362,368,3,
        46,23,0,363,364,5,96,0,0,364,365,5,1,0,0,365,367,3,46,23,0,366,363,
        1,0,0,0,367,370,1,0,0,0,368,366,1,0,0,0,368,369,1,0,0,0,369,45,1,
        0,0,0,370,368,1,0,0,0,371,378,3,48,24,0,372,373,5,131,0,0,373,374,
        3,44,22,0,374,375,5,150,0,0,375,378,1,0,0,0,376,378,3,160,80,0,377,
        371,1,0,0,0,377,372,1,0,0,0,377,376,1,0,0,0,378,47,1,0,0,0,379,381,
        3,50,25,0,380,379,1,0,0,0,380,381,1,0,0,0,381,382,1,0,0,0,382,384,
        5,80,0,0,383,385,5,24,0,0,384,383,1,0,0,0,384,385,1,0,0,0,385,387,
        1,0,0,0,386,388,3,52,26,0,387,386,1,0,0,0,387,388,1,0,0,0,388,389,
        1,0,0,0,389,391,3,114,57,0,390,392,3,54,27,0,391,390,1,0,0,0,391,
        392,1,0,0,0,392,394,1,0,0,0,393,395,3,56,28,0,394,393,1,0,0,0,394,
        395,1,0,0,0,395,397,1,0,0,0,396,398,3,60,30,0,397,396,1,0,0,0,397,
        398,1,0,0,0,398,400,1,0,0,0,399,401,3,62,31,0,400,399,1,0,0,0,400,
        401,1,0,0,0,401,403,1,0,0,0,402,404,3,64,32,0,403,402,1,0,0,0,403,
        404,1,0,0,0,404,407,1,0,0,0,405,406,5,103,0,0,406,408,7,1,0,0,407,
        405,1,0,0,0,407,408,1,0,0,0,408,411,1,0,0,0,409,410,5,103,0,0,410,
        412,5,90,0,0,411,409,1,0,0,0,411,412,1,0,0,0,412,414,1,0,0,0,413,
        415,3,66,33,0,414,413,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,
        418,3,58,29,0,417,416,1,0,0,0,417,418,1,0,0,0,418,420,1,0,0,0,419,
        421,3,68,34,0,420,419,1,0,0,0,420,421,1,0,0,0,421,424,1,0,0,0,422,
        425,3,72,36,0,423,425,3,74,37,0,424,422,1,0,0,0,424,423,1,0,0,0,
        424,425,1,0,0,0,425,427,1,0,0,0,426,428,3,76,38,0,427,426,1,0,0,
        0,427,428,1,0,0,0,428,49,1,0,0,0,429,430,5,103,0,0,430,431,3,124,
        62,0,431,51,1,0,0,0,432,433,5,89,0,0,433,436,5,109,0,0,434,435,5,
        103,0,0,435,437,5,86,0,0,436,434,1,0,0,0,436,437,1,0,0,0,437,53,
        1,0,0,0,438,439,5,34,0,0,439,440,3,78,39,0,440,55,1,0,0,0,441,443,
        7,2,0,0,442,441,1,0,0,0,442,443,1,0,0,0,443,444,1,0,0,0,444,445,
        5,5,0,0,445,446,5,48,0,0,446,447,3,114,57,0,447,57,1,0,0,0,448,449,
        5,102,0,0,449,450,3,156,78,0,450,451,5,6,0,0,451,452,5,131,0,0,452,
        453,3,98,49,0,453,463,5,150,0,0,454,455,5,117,0,0,455,456,3,156,
        78,0,456,457,5,6,0,0,457,458,5,131,0,0,458,459,3,98,49,0,459,460,
        5,150,0,0,460,462,1,0,0,0,461,454,1,0,0,0,462,465,1,0,0,0,463,461,
        1,0,0,0,463,464,1,0,0,0,464,59,1,0,0,0,465,463,1,0,0,0,466,467,5,
        70,0,0,467,468,3,116,58,0,468,61,1,0,0,0,469,470,5,100,0,0,470,471,
        3,116,58,0,471,63,1,0,0,0,472,473,5,37,0,0,473,480,5,11,0,0,474,
        475,7,1,0,0,475,476,5,131,0,0,476,477,3,114,57,0,477,478,5,150,0,
        0,478,481,1,0,0,0,479,481,3,114,57,0,480,474,1,0,0,0,480,479,1,0,
        0,0,481,65,1,0,0,0,482,483,5,38,0,0,483,484,3,116,58,0,484,67,1,
        0,0,0,485,486,5,65,0,0,486,487,5,11,0,0,487,488,3,88,44,0,488,69,
        1,0,0,0,489,490,5,65,0,0,490,491,5,11,0,0,491,492,3,114,57,0,492,
        71,1,0,0,0,493,494,5,55,0,0,494,497,3,116,58,0,495,496,5,117,0,0,
        496,498,3,116,58,0,497,495,1,0,0,0,497,498,1,0,0,0,498,503,1,0,0,
        0,499,500,5,103,0,0,500,504,5,86,0,0,501,502,5,11,0,0,502,504,3,
        114,57,0,503,499,1,0,0,0,503,501,1,0,0,0,503,504,1,0,0,0,504,523,
        1,0,0,0,505,506,5,55,0,0,506,509,3,116,58,0,507,508,5,103,0,0,508,
        510,5,86,0,0,509,507,1,0,0,0,509,510,1,0,0,0,510,511,1,0,0,0,511,
        512,5,62,0,0,512,513,3,116,58,0,513,523,1,0,0,0,514,515,5,55,0,0,
        515,516,3,116,58,0,516,517,5,62,0,0,517,520,3,116,58,0,518,519,5,
        11,0,0,519,521,3,114,57,0,520,518,1,0,0,0,520,521,1,0,0,0,521,523,
        1,0,0,0,522,493,1,0,0,0,522,505,1,0,0,0,522,514,1,0,0,0,523,73,1,
        0,0,0,524,525,5,62,0,0,525,526,3,116,58,0,526,75,1,0,0,0,527,528,
        5,82,0,0,528,529,3,94,47,0,529,77,1,0,0,0,530,531,6,39,-1,0,531,
        533,3,132,66,0,532,534,5,28,0,0,533,532,1,0,0,0,533,534,1,0,0,0,
        534,536,1,0,0,0,535,537,3,86,43,0,536,535,1,0,0,0,536,537,1,0,0,
        0,537,543,1,0,0,0,538,539,5,131,0,0,539,540,3,78,39,0,540,541,5,
        150,0,0,541,543,1,0,0,0,542,530,1,0,0,0,542,538,1,0,0,0,543,558,
        1,0,0,0,544,545,10,3,0,0,545,546,3,82,41,0,546,547,3,78,39,4,547,
        557,1,0,0,0,548,550,10,4,0,0,549,551,3,80,40,0,550,549,1,0,0,0,550,
        551,1,0,0,0,551,552,1,0,0,0,552,553,5,48,0,0,553,554,3,78,39,0,554,
        555,3,84,42,0,555,557,1,0,0,0,556,544,1,0,0,0,556,548,1,0,0,0,557,
        560,1,0,0,0,558,556,1,0,0,0,558,559,1,0,0,0,559,79,1,0,0,0,560,558,
        1,0,0,0,561,563,7,3,0,0,562,561,1,0,0,0,562,563,1,0,0,0,563,564,
        1,0,0,0,564,571,5,45,0,0,565,567,5,45,0,0,566,568,7,3,0,0,567,566,
        1,0,0,0,567,568,1,0,0,0,568,571,1,0,0,0,569,571,7,3,0,0,570,562,
        1,0,0,0,570,565,1,0,0,0,570,569,1,0,0,0,571,605,1,0,0,0,572,574,
        7,4,0,0,573,572,1,0,0,0,573,574,1,0,0,0,574,575,1,0,0,0,575,577,
        7,5,0,0,576,578,5,66,0,0,577,576,1,0,0,0,577,578,1,0,0,0,578,587,
        1,0,0,0,579,581,7,5,0,0,580,582,5,66,0,0,581,580,1,0,0,0,581,582,
        1,0,0,0,582,584,1,0,0,0,583,585,7,4,0,0,584,583,1,0,0,0,584,585,
        1,0,0,0,585,587,1,0,0,0,586,573,1,0,0,0,586,579,1,0,0,0,587,605,
        1,0,0,0,588,590,7,6,0,0,589,588,1,0,0,0,589,590,1,0,0,0,590,591,
        1,0,0,0,591,593,5,35,0,0,592,594,5,66,0,0,593,592,1,0,0,0,593,594,
        1,0,0,0,594,603,1,0,0,0,595,597,5,35,0,0,596,598,5,66,0,0,597,596,
        1,0,0,0,597,598,1,0,0,0,598,600,1,0,0,0,599,601,7,6,0,0,600,599,
        1,0,0,0,600,601,1,0,0,0,601,603,1,0,0,0,602,589,1,0,0,0,602,595,
        1,0,0,0,603,605,1,0,0,0,604,570,1,0,0,0,604,586,1,0,0,0,604,602,
        1,0,0,0,605,81,1,0,0,0,606,607,5,17,0,0,607,610,5,48,0,0,608,610,
        5,117,0,0,609,606,1,0,0,0,609,608,1,0,0,0,610,83,1,0,0,0,611,612,
        5,63,0,0,612,621,3,114,57,0,613,614,5,97,0,0,614,615,5,131,0,0,615,
        616,3,114,57,0,616,617,5,150,0,0,617,621,1,0,0,0,618,619,5,97,0,
        0,619,621,3,114,57,0,620,611,1,0,0,0,620,613,1,0,0,0,620,618,1,0,
        0,0,621,85,1,0,0,0,622,623,5,78,0,0,623,626,3,92,46,0,624,625,5,
        62,0,0,625,627,3,92,46,0,626,624,1,0,0,0,626,627,1,0,0,0,627,87,
        1,0,0,0,628,633,3,90,45,0,629,630,5,117,0,0,630,632,3,90,45,0,631,
        629,1,0,0,0,632,635,1,0,0,0,633,631,1,0,0,0,633,634,1,0,0,0,634,
        89,1,0,0,0,635,633,1,0,0,0,636,638,3,116,58,0,637,639,7,7,0,0,638,
        637,1,0,0,0,638,639,1,0,0,0,639,642,1,0,0,0,640,641,5,61,0,0,641,
        643,7,8,0,0,642,640,1,0,0,0,642,643,1,0,0,0,643,646,1,0,0,0,644,
        645,5,16,0,0,645,647,5,111,0,0,646,644,1,0,0,0,646,647,1,0,0,0,647,
        91,1,0,0,0,648,655,3,160,80,0,649,652,3,144,72,0,650,651,5,152,0,
        0,651,653,3,144,72,0,652,650,1,0,0,0,652,653,1,0,0,0,653,655,1,0,
        0,0,654,648,1,0,0,0,654,649,1,0,0,0,655,93,1,0,0,0,656,661,3,96,
        48,0,657,658,5,117,0,0,658,660,3,96,48,0,659,657,1,0,0,0,660,663,
        1,0,0,0,661,659,1,0,0,0,661,662,1,0,0,0,662,95,1,0,0,0,663,661,1,
        0,0,0,664,665,3,156,78,0,665,666,5,123,0,0,666,667,3,146,73,0,667,
        97,1,0,0,0,668,670,3,100,50,0,669,668,1,0,0,0,669,670,1,0,0,0,670,
        672,1,0,0,0,671,673,3,102,51,0,672,671,1,0,0,0,672,673,1,0,0,0,673,
        675,1,0,0,0,674,676,3,104,52,0,675,674,1,0,0,0,675,676,1,0,0,0,676,
        99,1,0,0,0,677,678,5,68,0,0,678,679,5,11,0,0,679,680,3,114,57,0,
        680,101,1,0,0,0,681,682,5,65,0,0,682,683,5,11,0,0,683,684,3,88,44,
        0,684,103,1,0,0,0,685,686,7,9,0,0,686,687,3,106,53,0,687,105,1,0,
        0,0,688,695,3,108,54,0,689,690,5,9,0,0,690,691,3,108,54,0,691,692,
        5,2,0,0,692,693,3,108,54,0,693,695,1,0,0,0,694,688,1,0,0,0,694,689,
        1,0,0,0,695,107,1,0,0,0,696,697,5,19,0,0,697,709,5,76,0,0,698,699,
        5,95,0,0,699,709,5,69,0,0,700,701,5,95,0,0,701,709,5,32,0,0,702,
        703,3,144,72,0,703,704,5,69,0,0,704,709,1,0,0,0,705,706,3,144,72,
        0,706,707,5,32,0,0,707,709,1,0,0,0,708,696,1,0,0,0,708,698,1,0,0,
        0,708,700,1,0,0,0,708,702,1,0,0,0,708,705,1,0,0,0,709,109,1,0,0,
        0,710,711,3,116,58,0,711,712,5,0,0,1,712,111,1,0,0,0,713,770,3,156,
        78,0,714,715,3,156,78,0,715,716,5,131,0,0,716,717,3,156,78,0,717,
        724,3,112,56,0,718,719,5,117,0,0,719,720,3,156,78,0,720,721,3,112,
        56,0,721,723,1,0,0,0,722,718,1,0,0,0,723,726,1,0,0,0,724,722,1,0,
        0,0,724,725,1,0,0,0,725,728,1,0,0,0,726,724,1,0,0,0,727,729,5,117,
        0,0,728,727,1,0,0,0,728,729,1,0,0,0,729,730,1,0,0,0,730,731,5,150,
        0,0,731,770,1,0,0,0,732,733,3,156,78,0,733,734,5,131,0,0,734,739,
        3,158,79,0,735,736,5,117,0,0,736,738,3,158,79,0,737,735,1,0,0,0,
        738,741,1,0,0,0,739,737,1,0,0,0,739,740,1,0,0,0,740,743,1,0,0,0,
        741,739,1,0,0,0,742,744,5,117,0,0,743,742,1,0,0,0,743,744,1,0,0,
        0,744,745,1,0,0,0,745,746,5,150,0,0,746,770,1,0,0,0,747,748,3,156,
        78,0,748,749,5,131,0,0,749,754,3,112,56,0,750,751,5,117,0,0,751,
        753,3,112,56,0,752,750,1,0,0,0,753,756,1,0,0,0,754,752,1,0,0,0,754,
        755,1,0,0,0,755,758,1,0,0,0,756,754,1,0,0,0,757,759,5,117,0,0,758,
        757,1,0,0,0,758,759,1,0,0,0,759,760,1,0,0,0,760,761,5,150,0,0,761,
        770,1,0,0,0,762,763,3,156,78,0,763,765,5,131,0,0,764,766,3,114,57,
        0,765,764,1,0,0,0,765,766,1,0,0,0,766,767,1,0,0,0,767,768,5,150,
        0,0,768,770,1,0,0,0,769,713,1,0,0,0,769,714,1,0,0,0,769,732,1,0,
        0,0,769,747,1,0,0,0,769,762,1,0,0,0,770,113,1,0,0,0,771,776,3,116,
        58,0,772,773,5,117,0,0,773,775,3,116,58,0,774,772,1,0,0,0,775,778,
        1,0,0,0,776,774,1,0,0,0,776,777,1,0,0,0,777,780,1,0,0,0,778,776,
        1,0,0,0,779,781,5,117,0,0,780,779,1,0,0,0,780,781,1,0,0,0,781,115,
        1,0,0,0,782,783,6,58,-1,0,783,785,5,12,0,0,784,786,3,116,58,0,785,
        784,1,0,0,0,785,786,1,0,0,0,786,792,1,0,0,0,787,788,5,99,0,0,788,
        789,3,116,58,0,789,790,5,84,0,0,790,791,3,116,58,0,791,793,1,0,0,
        0,792,787,1,0,0,0,793,794,1,0,0,0,794,792,1,0,0,0,794,795,1,0,0,
        0,795,798,1,0,0,0,796,797,5,25,0,0,797,799,3,116,58,0,798,796,1,
        0,0,0,798,799,1,0,0,0,799,800,1,0,0,0,800,801,5,26,0,0,801,933,1,
        0,0,0,802,803,5,13,0,0,803,804,5,131,0,0,804,805,3,116,58,0,805,
        806,5,6,0,0,806,807,3,112,56,0,807,808,5,150,0,0,808,933,1,0,0,0,
        809,810,5,20,0,0,810,933,5,111,0,0,811,812,5,46,0,0,812,813,3,116,
        58,0,813,814,3,148,74,0,814,933,1,0,0,0,815,816,5,83,0,0,816,817,
        5,131,0,0,817,818,3,116,58,0,818,819,5,34,0,0,819,822,3,116,58,0,
        820,821,5,33,0,0,821,823,3,116,58,0,822,820,1,0,0,0,822,823,1,0,
        0,0,823,824,1,0,0,0,824,825,5,150,0,0,825,933,1,0,0,0,826,827,5,
        87,0,0,827,933,5,111,0,0,828,829,5,92,0,0,829,830,5,131,0,0,830,
        831,7,10,0,0,831,832,3,162,81,0,832,833,5,34,0,0,833,834,3,116,58,
        0,834,835,5,150,0,0,835,933,1,0,0,0,836,837,3,156,78,0,837,839,5,
        131,0,0,838,840,3,114,57,0,839,838,1,0,0,0,839,840,1,0,0,0,840,841,
        1,0,0,0,841,842,5,150,0,0,842,851,1,0,0,0,843,845,5,131,0,0,844,
        846,5,24,0,0,845,844,1,0,0,0,845,846,1,0,0,0,846,848,1,0,0,0,847,
        849,3,114,57,0,848,847,1,0,0,0,848,849,1,0,0,0,849,850,1,0,0,0,850,
        852,5,150,0,0,851,843,1,0,0,0,851,852,1,0,0,0,852,853,1,0,0,0,853,
        854,5,67,0,0,854,855,5,131,0,0,855,856,3,98,49,0,856,857,5,150,0,
        0,857,933,1,0,0,0,858,859,3,156,78,0,859,861,5,131,0,0,860,862,3,
        114,57,0,861,860,1,0,0,0,861,862,1,0,0,0,862,863,1,0,0,0,863,864,
        5,150,0,0,864,873,1,0,0,0,865,867,5,131,0,0,866,868,5,24,0,0,867,
        866,1,0,0,0,867,868,1,0,0,0,868,870,1,0,0,0,869,871,3,114,57,0,870,
        869,1,0,0,0,870,871,1,0,0,0,871,872,1,0,0,0,872,874,5,150,0,0,873,
        865,1,0,0,0,873,874,1,0,0,0,874,875,1,0,0,0,875,876,5,67,0,0,876,
        877,3,156,78,0,877,933,1,0,0,0,878,884,3,156,78,0,879,881,5,131,
        0,0,880,882,3,114,57,0,881,880,1,0,0,0,881,882,1,0,0,0,882,883,1,
        0,0,0,883,885,5,150,0,0,884,879,1,0,0,0,884,885,1,0,0,0,885,886,
        1,0,0,0,886,888,5,131,0,0,887,889,5,24,0,0,888,887,1,0,0,0,888,889,
        1,0,0,0,889,891,1,0,0,0,890,892,3,114,57,0,891,890,1,0,0,0,891,892,
        1,0,0,0,892,893,1,0,0,0,893,894,5,150,0,0,894,933,1,0,0,0,895,933,
        3,120,60,0,896,933,3,164,82,0,897,933,3,146,73,0,898,899,5,119,0,
        0,899,933,3,116,58,20,900,901,5,59,0,0,901,933,3,116,58,14,902,903,
        3,136,68,0,903,904,5,121,0,0,904,906,1,0,0,0,905,902,1,0,0,0,905,
        906,1,0,0,0,906,907,1,0,0,0,907,933,5,113,0,0,908,909,5,131,0,0,
        909,910,3,44,22,0,910,911,5,150,0,0,911,933,1,0,0,0,912,913,5,131,
        0,0,913,914,3,116,58,0,914,915,5,150,0,0,915,933,1,0,0,0,916,917,
        5,131,0,0,917,918,3,114,57,0,918,919,5,150,0,0,919,933,1,0,0,0,920,
        922,5,130,0,0,921,923,3,114,57,0,922,921,1,0,0,0,922,923,1,0,0,0,
        923,924,1,0,0,0,924,933,5,149,0,0,925,927,5,129,0,0,926,928,3,40,
        20,0,927,926,1,0,0,0,927,928,1,0,0,0,928,929,1,0,0,0,929,933,5,148,
        0,0,930,933,3,118,59,0,931,933,3,128,64,0,932,782,1,0,0,0,932,802,
        1,0,0,0,932,809,1,0,0,0,932,811,1,0,0,0,932,815,1,0,0,0,932,826,
        1,0,0,0,932,828,1,0,0,0,932,836,1,0,0,0,932,858,1,0,0,0,932,878,
        1,0,0,0,932,895,1,0,0,0,932,896,1,0,0,0,932,897,1,0,0,0,932,898,
        1,0,0,0,932,900,1,0,0,0,932,905,1,0,0,0,932,908,1,0,0,0,932,912,
        1,0,0,0,932,916,1,0,0,0,932,920,1,0,0,0,932,925,1,0,0,0,932,930,
        1,0,0,0,932,931,1,0,0,0,933,1044,1,0,0,0,934,938,10,19,0,0,935,939,
        5,113,0,0,936,939,5,152,0,0,937,939,5,139,0,0,938,935,1,0,0,0,938,
        936,1,0,0,0,938,937,1,0,0,0,939,940,1,0,0,0,940,1043,3,116,58,20,
        941,945,10,18,0,0,942,946,5,140,0,0,943,946,5,119,0,0,944,946,5,
        118,0,0,945,942,1,0,0,0,945,943,1,0,0,0,945,944,1,0,0,0,946,947,
        1,0,0,0,947,1043,3,116,58,19,948,973,10,17,0,0,949,974,5,122,0,0,
        950,974,5,123,0,0,951,974,5,134,0,0,952,974,5,132,0,0,953,974,5,
        133,0,0,954,974,5,124,0,0,955,974,5,125,0,0,956,958,5,59,0,0,957,
        956,1,0,0,0,957,958,1,0,0,0,958,959,1,0,0,0,959,961,5,43,0,0,960,
        962,5,15,0,0,961,960,1,0,0,0,961,962,1,0,0,0,962,974,1,0,0,0,963,
        965,5,59,0,0,964,963,1,0,0,0,964,965,1,0,0,0,965,966,1,0,0,0,966,
        974,7,11,0,0,967,974,5,146,0,0,968,974,5,147,0,0,969,974,5,136,0,
        0,970,974,5,127,0,0,971,974,5,128,0,0,972,974,5,135,0,0,973,949,
        1,0,0,0,973,950,1,0,0,0,973,951,1,0,0,0,973,952,1,0,0,0,973,953,
        1,0,0,0,973,954,1,0,0,0,973,955,1,0,0,0,973,957,1,0,0,0,973,964,
        1,0,0,0,973,967,1,0,0,0,973,968,1,0,0,0,973,969,1,0,0,0,973,970,
        1,0,0,0,973,971,1,0,0,0,973,972,1,0,0,0,974,975,1,0,0,0,975,1043,
        3,116,58,18,976,977,10,15,0,0,977,978,5,138,0,0,978,1043,3,116,58,
        16,979,980,10,13,0,0,980,981,5,2,0,0,981,1043,3,116,58,14,982,983,
        10,12,0,0,983,984,5,64,0,0,984,1043,3,116,58,13,985,987,10,11,0,
        0,986,988,5,59,0,0,987,986,1,0,0,0,987,988,1,0,0,0,988,989,1,0,0,
        0,989,990,5,9,0,0,990,991,3,116,58,0,991,992,5,2,0,0,992,993,3,116,
        58,12,993,1043,1,0,0,0,994,995,10,10,0,0,995,996,5,141,0,0,996,997,
        3,116,58,0,997,998,5,116,0,0,998,999,3,116,58,10,999,1043,1,0,0,
        0,1000,1001,10,30,0,0,1001,1003,5,131,0,0,1002,1004,3,114,57,0,1003,
        1002,1,0,0,0,1003,1004,1,0,0,0,1004,1005,1,0,0,0,1005,1043,5,150,
        0,0,1006,1007,10,26,0,0,1007,1008,5,130,0,0,1008,1009,3,116,58,0,
        1009,1010,5,149,0,0,1010,1043,1,0,0,0,1011,1012,10,25,0,0,1012,1013,
        5,121,0,0,1013,1043,5,109,0,0,1014,1015,10,24,0,0,1015,1016,5,121,
        0,0,1016,1043,3,156,78,0,1017,1018,10,23,0,0,1018,1019,5,137,0,0,
        1019,1020,5,130,0,0,1020,1021,3,116,58,0,1021,1022,5,149,0,0,1022,
        1043,1,0,0,0,1023,1024,10,22,0,0,1024,1025,5,137,0,0,1025,1043,5,
        109,0,0,1026,1027,10,21,0,0,1027,1028,5,137,0,0,1028,1043,3,156,
        78,0,1029,1030,10,16,0,0,1030,1032,5,47,0,0,1031,1033,5,59,0,0,1032,
        1031,1,0,0,0,1032,1033,1,0,0,0,1033,1034,1,0,0,0,1034,1043,5,60,
        0,0,1035,1040,10,9,0,0,1036,1037,5,6,0,0,1037,1041,3,156,78,0,1038,
        1039,5,6,0,0,1039,1041,5,111,0,0,1040,1036,1,0,0,0,1040,1038,1,0,
        0,0,1041,1043,1,0,0,0,1042,934,1,0,0,0,1042,941,1,0,0,0,1042,948,
        1,0,0,0,1042,976,1,0,0,0,1042,979,1,0,0,0,1042,982,1,0,0,0,1042,
        985,1,0,0,0,1042,994,1,0,0,0,1042,1000,1,0,0,0,1042,1006,1,0,0,0,
        1042,1011,1,0,0,0,1042,1014,1,0,0,0,1042,1017,1,0,0,0,1042,1023,
        1,0,0,0,1042,1026,1,0,0,0,1042,1029,1,0,0,0,1042,1035,1,0,0,0,1043,
        1046,1,0,0,0,1044,1042,1,0,0,0,1044,1045,1,0,0,0,1045,117,1,0,0,
        0,1046,1044,1,0,0,0,1047,1048,5,131,0,0,1048,1053,3,156,78,0,1049,
        1050,5,117,0,0,1050,1052,3,156,78,0,1051,1049,1,0,0,0,1052,1055,
        1,0,0,0,1053,1051,1,0,0,0,1053,1054,1,0,0,0,1054,1057,1,0,0,0,1055,
        1053,1,0,0,0,1056,1058,5,117,0,0,1057,1056,1,0,0,0,1057,1058,1,0,
        0,0,1058,1059,1,0,0,0,1059,1060,5,150,0,0,1060,1075,1,0,0,0,1061,
        1066,3,156,78,0,1062,1063,5,117,0,0,1063,1065,3,156,78,0,1064,1062,
        1,0,0,0,1065,1068,1,0,0,0,1066,1064,1,0,0,0,1066,1067,1,0,0,0,1067,
        1070,1,0,0,0,1068,1066,1,0,0,0,1069,1071,5,117,0,0,1070,1069,1,0,
        0,0,1070,1071,1,0,0,0,1071,1075,1,0,0,0,1072,1073,5,131,0,0,1073,
        1075,5,150,0,0,1074,1047,1,0,0,0,1074,1061,1,0,0,0,1074,1072,1,0,
        0,0,1075,1076,1,0,0,0,1076,1079,5,112,0,0,1077,1080,3,116,58,0,1078,
        1080,3,36,18,0,1079,1077,1,0,0,0,1079,1078,1,0,0,0,1080,119,1,0,
        0,0,1081,1082,5,133,0,0,1082,1086,3,156,78,0,1083,1085,3,122,61,
        0,1084,1083,1,0,0,0,1085,1088,1,0,0,0,1086,1084,1,0,0,0,1086,1087,
        1,0,0,0,1087,1089,1,0,0,0,1088,1086,1,0,0,0,1089,1090,5,152,0,0,
        1090,1091,5,125,0,0,1091,1114,1,0,0,0,1092,1093,5,133,0,0,1093,1097,
        3,156,78,0,1094,1096,3,122,61,0,1095,1094,1,0,0,0,1096,1099,1,0,
        0,0,1097,1095,1,0,0,0,1097,1098,1,0,0,0,1098,1100,1,0,0,0,1099,1097,
        1,0,0,0,1100,1106,5,125,0,0,1101,1107,3,120,60,0,1102,1103,5,129,
        0,0,1103,1104,3,116,58,0,1104,1105,5,148,0,0,1105,1107,1,0,0,0,1106,
        1101,1,0,0,0,1106,1102,1,0,0,0,1106,1107,1,0,0,0,1107,1108,1,0,0,
        0,1108,1109,5,133,0,0,1109,1110,5,152,0,0,1110,1111,3,156,78,0,1111,
        1112,5,125,0,0,1112,1114,1,0,0,0,1113,1081,1,0,0,0,1113,1092,1,0,
        0,0,1114,121,1,0,0,0,1115,1116,3,156,78,0,1116,1117,5,123,0,0,1117,
        1118,3,162,81,0,1118,1127,1,0,0,0,1119,1120,3,156,78,0,1120,1121,
        5,123,0,0,1121,1122,5,129,0,0,1122,1123,3,116,58,0,1123,1124,5,148,
        0,0,1124,1127,1,0,0,0,1125,1127,3,156,78,0,1126,1115,1,0,0,0,1126,
        1119,1,0,0,0,1126,1125,1,0,0,0,1127,123,1,0,0,0,1128,1133,3,126,
        63,0,1129,1130,5,117,0,0,1130,1132,3,126,63,0,1131,1129,1,0,0,0,
        1132,1135,1,0,0,0,1133,1131,1,0,0,0,1133,1134,1,0,0,0,1134,1137,
        1,0,0,0,1135,1133,1,0,0,0,1136,1138,5,117,0,0,1137,1136,1,0,0,0,
        1137,1138,1,0,0,0,1138,125,1,0,0,0,1139,1140,3,156,78,0,1140,1141,
        5,6,0,0,1141,1142,5,131,0,0,1142,1143,3,44,22,0,1143,1144,5,150,
        0,0,1144,1150,1,0,0,0,1145,1146,3,116,58,0,1146,1147,5,6,0,0,1147,
        1148,3,156,78,0,1148,1150,1,0,0,0,1149,1139,1,0,0,0,1149,1145,1,
        0,0,0,1150,127,1,0,0,0,1151,1159,3,160,80,0,1152,1153,3,136,68,0,
        1153,1154,5,121,0,0,1154,1156,1,0,0,0,1155,1152,1,0,0,0,1155,1156,
        1,0,0,0,1156,1157,1,0,0,0,1157,1159,3,130,65,0,1158,1151,1,0,0,0,
        1158,1155,1,0,0,0,1159,129,1,0,0,0,1160,1165,3,156,78,0,1161,1162,
        5,121,0,0,1162,1164,3,156,78,0,1163,1161,1,0,0,0,1164,1167,1,0,0,
        0,1165,1163,1,0,0,0,1165,1166,1,0,0,0,1166,131,1,0,0,0,1167,1165,
        1,0,0,0,1168,1169,6,66,-1,0,1169,1178,3,136,68,0,1170,1178,3,134,
        67,0,1171,1172,5,131,0,0,1172,1173,3,44,22,0,1173,1174,5,150,0,0,
        1174,1178,1,0,0,0,1175,1178,3,120,60,0,1176,1178,3,160,80,0,1177,
        1168,1,0,0,0,1177,1170,1,0,0,0,1177,1171,1,0,0,0,1177,1175,1,0,0,
        0,1177,1176,1,0,0,0,1178,1187,1,0,0,0,1179,1183,10,3,0,0,1180,1184,
        3,154,77,0,1181,1182,5,6,0,0,1182,1184,3,156,78,0,1183,1180,1,0,
        0,0,1183,1181,1,0,0,0,1184,1186,1,0,0,0,1185,1179,1,0,0,0,1186,1189,
        1,0,0,0,1187,1185,1,0,0,0,1187,1188,1,0,0,0,1188,133,1,0,0,0,1189,
        1187,1,0,0,0,1190,1191,3,156,78,0,1191,1193,5,131,0,0,1192,1194,
        3,138,69,0,1193,1192,1,0,0,0,1193,1194,1,0,0,0,1194,1195,1,0,0,0,
        1195,1196,5,150,0,0,1196,135,1,0,0,0,1197,1198,3,140,70,0,1198,1199,
        5,121,0,0,1199,1201,1,0,0,0,1200,1197,1,0,0,0,1200,1201,1,0,0,0,
        1201,1202,1,0,0,0,1202,1203,3,156,78,0,1203,137,1,0,0,0,1204,1209,
        3,116,58,0,1205,1206,5,117,0,0,1206,1208,3,116,58,0,1207,1205,1,
        0,0,0,1208,1211,1,0,0,0,1209,1207,1,0,0,0,1209,1210,1,0,0,0,1210,
        1213,1,0,0,0,1211,1209,1,0,0,0,1212,1214,5,117,0,0,1213,1212,1,0,
        0,0,1213,1214,1,0,0,0,1214,139,1,0,0,0,1215,1216,3,156,78,0,1216,
        141,1,0,0,0,1217,1226,5,107,0,0,1218,1219,5,121,0,0,1219,1226,7,
        12,0,0,1220,1221,5,109,0,0,1221,1223,5,121,0,0,1222,1224,7,12,0,
        0,1223,1222,1,0,0,0,1223,1224,1,0,0,0,1224,1226,1,0,0,0,1225,1217,
        1,0,0,0,1225,1218,1,0,0,0,1225,1220,1,0,0,0,1226,143,1,0,0,0,1227,
        1229,7,13,0,0,1228,1227,1,0,0,0,1228,1229,1,0,0,0,1229,1236,1,0,
        0,0,1230,1237,3,142,71,0,1231,1237,5,108,0,0,1232,1237,5,109,0,0,
        1233,1237,5,110,0,0,1234,1237,5,44,0,0,1235,1237,5,58,0,0,1236,1230,
        1,0,0,0,1236,1231,1,0,0,0,1236,1232,1,0,0,0,1236,1233,1,0,0,0,1236,
        1234,1,0,0,0,1236,1235,1,0,0,0,1237,145,1,0,0,0,1238,1242,3,144,
        72,0,1239,1242,5,111,0,0,1240,1242,5,60,0,0,1241,1238,1,0,0,0,1241,
        1239,1,0,0,0,1241,1240,1,0,0,0,1242,147,1,0,0,0,1243,1244,7,14,0,
        0,1244,149,1,0,0,0,1245,1246,7,15,0,0,1246,151,1,0,0,0,1247,1248,
        7,16,0,0,1248,153,1,0,0,0,1249,1252,5,106,0,0,1250,1252,3,152,76,
        0,1251,1249,1,0,0,0,1251,1250,1,0,0,0,1252,155,1,0,0,0,1253,1257,
        5,106,0,0,1254,1257,3,148,74,0,1255,1257,3,150,75,0,1256,1253,1,
        0,0,0,1256,1254,1,0,0,0,1256,1255,1,0,0,0,1257,157,1,0,0,0,1258,
        1259,3,162,81,0,1259,1260,5,123,0,0,1260,1261,3,144,72,0,1261,159,
        1,0,0,0,1262,1263,5,129,0,0,1263,1264,3,130,65,0,1264,1265,5,148,
        0,0,1265,161,1,0,0,0,1266,1269,5,111,0,0,1267,1269,3,164,82,0,1268,
        1266,1,0,0,0,1268,1267,1,0,0,0,1269,163,1,0,0,0,1270,1274,5,143,
        0,0,1271,1273,3,166,83,0,1272,1271,1,0,0,0,1273,1276,1,0,0,0,1274,
        1272,1,0,0,0,1274,1275,1,0,0,0,1275,1277,1,0,0,0,1276,1274,1,0,0,
        0,1277,1278,5,145,0,0,1278,165,1,0,0,0,1279,1280,5,158,0,0,1280,
        1281,3,116,58,0,1281,1282,5,148,0,0,1282,1285,1,0,0,0,1283,1285,
        5,157,0,0,1284,1279,1,0,0,0,1284,1283,1,0,0,0,1285,167,1,0,0,0,1286,
        1290,5,144,0,0,1287,1289,3,170,85,0,1288,1287,1,0,0,0,1289,1292,
        1,0,0,0,1290,1288,1,0,0,0,1290,1291,1,0,0,0,1291,1293,1,0,0,0,1292,
        1290,1,0,0,0,1293,1294,5,0,0,1,1294,169,1,0,0,0,1295,1296,5,160,
        0,0,1296,1297,3,116,58,0,1297,1298,5,148,0,0,1298,1301,1,0,0,0,1299,
        1301,5,159,0,0,1300,1295,1,0,0,0,1300,1299,1,0,0,0,1301,171,1,0,
        0,0,167,175,182,191,198,202,216,220,223,227,230,237,241,250,255,
        264,272,279,283,289,294,302,309,315,327,335,349,353,358,368,377,
        380,384,387,391,394,397,400,403,407,411,414,417,420,424,427,436,
        442,463,480,497,503,509,520,522,533,536,542,550,556,558,562,567,
        570,573,577,581,584,586,589,593,597,600,602,604,609,620,626,633,
        638,642,646,652,654,661,669,672,675,694,708,724,728,739,743,754,
        758,765,769,776,780,785,794,798,822,839,845,848,851,861,867,870,
        873,881,884,888,891,905,922,927,932,938,945,957,961,964,973,987,
        1003,1032,1040,1042,1044,1053,1057,1066,1070,1074,1079,1086,1097,
        1106,1113,1126,1133,1137,1149,1155,1158,1165,1177,1183,1187,1193,
        1200,1209,1213,1223,1225,1228,1236,1241,1251,1256,1268,1274,1284,
        1290,1300
    ]

class HogQLParser ( Parser ):

    grammarFileName = "HogQLParser.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'->'", "'*'", "'`'", "'\\'", "':'", "','", "'||'", 
                     "'-'", "'$'", "'.'", "'=='", "'='", "'>='", "'>'", 
                     "'#'", "'~*'", "'=~*'", "'{'", "'['", "'('", "'<='", 
                     "'<'", "<INVALID>", "'!~*'", "'!~'", "'?.'", "'??'", 
                     "'%'", "'+'", "'?'", "'\"'", "'f''", "'F''", "'''", 
                     "'~'", "'=~'", "'}'", "']'", "')'", "';'", "'/'", "'_'" ]

    symbolicNames = [ "<INVALID>", "ALL", "AND", "ANTI", "ANY", "ARRAY", 
                      "AS", "ASCENDING", "ASOF", "BETWEEN", "BOTH", "BY", 
                      "CASE", "CAST", "CATCH", "COHORT", "COLLATE", "CROSS", 
                      "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", 
                      "DISTINCT", "ELSE", "END", "EXTRACT", "FINAL", "FINALLY", 
                      "FIRST", "FN", "FOLLOWING", "FOR", "FROM", "FULL", 
                      "FUN", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", 
                      "IN", "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", 
                      "LAST", "LEADING", "LEFT", "LET", "LIKE", "LIMIT", 
                      "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", 
                      "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", 
                      "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", 
                      "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", 
                      "SELECT", "SEMI", "SETTINGS", "SUBSTRING", "THEN", 
                      "THROW", "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", 
                      "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", 
                      "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", 
                      "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", 
                      "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", 
                      "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", 
                      "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", 
                      "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", 
                      "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", 
                      "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", 
                      "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", "NULLISH", 
                      "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", 
                      "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", 
                      "REGEX_DOUBLE", "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", 
                      "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", 
                      "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", 
                      "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" ]

    RULE_program = 0
    RULE_declaration = 1
    RULE_expression = 2
    RULE_varDecl = 3
    RULE_identifierList = 4
    RULE_statement = 5
    RULE_returnStmt = 6
    RULE_throwStmt = 7
    RULE_catchBlock = 8
    RULE_tryCatchStmt = 9
    RULE_ifStmt = 10
    RULE_whileStmt = 11
    RULE_forStmt = 12
    RULE_forInStmt = 13
    RULE_funcStmt = 14
    RULE_varAssignment = 15
    RULE_exprStmt = 16
    RULE_emptyStmt = 17
    RULE_block = 18
    RULE_kvPair = 19
    RULE_kvPairList = 20
    RULE_select = 21
    RULE_selectUnionStmt = 22
    RULE_selectStmtWithParens = 23
    RULE_selectStmt = 24
    RULE_withClause = 25
    RULE_topClause = 26
    RULE_fromClause = 27
    RULE_arrayJoinClause = 28
    RULE_windowClause = 29
    RULE_prewhereClause = 30
    RULE_whereClause = 31
    RULE_groupByClause = 32
    RULE_havingClause = 33
    RULE_orderByClause = 34
    RULE_projectionOrderByClause = 35
    RULE_limitAndOffsetClause = 36
    RULE_offsetOnlyClause = 37
    RULE_settingsClause = 38
    RULE_joinExpr = 39
    RULE_joinOp = 40
    RULE_joinOpCross = 41
    RULE_joinConstraintClause = 42
    RULE_sampleClause = 43
    RULE_orderExprList = 44
    RULE_orderExpr = 45
    RULE_ratioExpr = 46
    RULE_settingExprList = 47
    RULE_settingExpr = 48
    RULE_windowExpr = 49
    RULE_winPartitionByClause = 50
    RULE_winOrderByClause = 51
    RULE_winFrameClause = 52
    RULE_winFrameExtend = 53
    RULE_winFrameBound = 54
    RULE_expr = 55
    RULE_columnTypeExpr = 56
    RULE_columnExprList = 57
    RULE_columnExpr = 58
    RULE_columnLambdaExpr = 59
    RULE_hogqlxTagElement = 60
    RULE_hogqlxTagAttribute = 61
    RULE_withExprList = 62
    RULE_withExpr = 63
    RULE_columnIdentifier = 64
    RULE_nestedIdentifier = 65
    RULE_tableExpr = 66
    RULE_tableFunctionExpr = 67
    RULE_tableIdentifier = 68
    RULE_tableArgList = 69
    RULE_databaseIdentifier = 70
    RULE_floatingLiteral = 71
    RULE_numberLiteral = 72
    RULE_literal = 73
    RULE_interval = 74
    RULE_keyword = 75
    RULE_keywordForAlias = 76
    RULE_alias = 77
    RULE_identifier = 78
    RULE_enumValue = 79
    RULE_placeholder = 80
    RULE_string = 81
    RULE_templateString = 82
    RULE_stringContents = 83
    RULE_fullTemplateString = 84
    RULE_stringContentsFull = 85

    ruleNames =  [ "program", "declaration", "expression", "varDecl", "identifierList", 
                   "statement", "returnStmt", "throwStmt", "catchBlock", 
                   "tryCatchStmt", "ifStmt", "whileStmt", "forStmt", "forInStmt", 
                   "funcStmt", "varAssignment", "exprStmt", "emptyStmt", 
                   "block", "kvPair", "kvPairList", "select", "selectUnionStmt", 
                   "selectStmtWithParens", "selectStmt", "withClause", "topClause", 
                   "fromClause", "arrayJoinClause", "windowClause", "prewhereClause", 
                   "whereClause", "groupByClause", "havingClause", "orderByClause", 
                   "projectionOrderByClause", "limitAndOffsetClause", "offsetOnlyClause", 
                   "settingsClause", "joinExpr", "joinOp", "joinOpCross", 
                   "joinConstraintClause", "sampleClause", "orderExprList", 
                   "orderExpr", "ratioExpr", "settingExprList", "settingExpr", 
                   "windowExpr", "winPartitionByClause", "winOrderByClause", 
                   "winFrameClause", "winFrameExtend", "winFrameBound", 
                   "expr", "columnTypeExpr", "columnExprList", "columnExpr", 
                   "columnLambdaExpr", "hogqlxTagElement", "hogqlxTagAttribute", 
                   "withExprList", "withExpr", "columnIdentifier", "nestedIdentifier", 
                   "tableExpr", "tableFunctionExpr", "tableIdentifier", 
                   "tableArgList", "databaseIdentifier", "floatingLiteral", 
                   "numberLiteral", "literal", "interval", "keyword", "keywordForAlias", 
                   "alias", "identifier", "enumValue", "placeholder", "string", 
                   "templateString", "stringContents", "fullTemplateString", 
                   "stringContentsFull" ]

    EOF = Token.EOF
    ALL=1
    AND=2
    ANTI=3
    ANY=4
    ARRAY=5
    AS=6
    ASCENDING=7
    ASOF=8
    BETWEEN=9
    BOTH=10
    BY=11
    CASE=12
    CAST=13
    CATCH=14
    COHORT=15
    COLLATE=16
    CROSS=17
    CUBE=18
    CURRENT=19
    DATE=20
    DAY=21
    DESC=22
    DESCENDING=23
    DISTINCT=24
    ELSE=25
    END=26
    EXTRACT=27
    FINAL=28
    FINALLY=29
    FIRST=30
    FN=31
    FOLLOWING=32
    FOR=33
    FROM=34
    FULL=35
    FUN=36
    GROUP=37
    HAVING=38
    HOUR=39
    ID=40
    IF=41
    ILIKE=42
    IN=43
    INF=44
    INNER=45
    INTERVAL=46
    IS=47
    JOIN=48
    KEY=49
    LAST=50
    LEADING=51
    LEFT=52
    LET=53
    LIKE=54
    LIMIT=55
    MINUTE=56
    MONTH=57
    NAN_SQL=58
    NOT=59
    NULL_SQL=60
    NULLS=61
    OFFSET=62
    ON=63
    OR=64
    ORDER=65
    OUTER=66
    OVER=67
    PARTITION=68
    PRECEDING=69
    PREWHERE=70
    QUARTER=71
    RANGE=72
    RETURN=73
    RIGHT=74
    ROLLUP=75
    ROW=76
    ROWS=77
    SAMPLE=78
    SECOND=79
    SELECT=80
    SEMI=81
    SETTINGS=82
    SUBSTRING=83
    THEN=84
    THROW=85
    TIES=86
    TIMESTAMP=87
    TO=88
    TOP=89
    TOTALS=90
    TRAILING=91
    TRIM=92
    TRUNCATE=93
    TRY=94
    UNBOUNDED=95
    UNION=96
    USING=97
    WEEK=98
    WHEN=99
    WHERE=100
    WHILE=101
    WINDOW=102
    WITH=103
    YEAR=104
    ESCAPE_CHAR_COMMON=105
    IDENTIFIER=106
    FLOATING_LITERAL=107
    OCTAL_LITERAL=108
    DECIMAL_LITERAL=109
    HEXADECIMAL_LITERAL=110
    STRING_LITERAL=111
    ARROW=112
    ASTERISK=113
    BACKQUOTE=114
    BACKSLASH=115
    COLON=116
    COMMA=117
    CONCAT=118
    DASH=119
    DOLLAR=120
    DOT=121
    EQ_DOUBLE=122
    EQ_SINGLE=123
    GT_EQ=124
    GT=125
    HASH=126
    IREGEX_SINGLE=127
    IREGEX_DOUBLE=128
    LBRACE=129
    LBRACKET=130
    LPAREN=131
    LT_EQ=132
    LT=133
    NOT_EQ=134
    NOT_IREGEX=135
    NOT_REGEX=136
    NULL_PROPERTY=137
    NULLISH=138
    PERCENT=139
    PLUS=140
    QUERY=141
    QUOTE_DOUBLE=142
    QUOTE_SINGLE_TEMPLATE=143
    QUOTE_SINGLE_TEMPLATE_FULL=144
    QUOTE_SINGLE=145
    REGEX_SINGLE=146
    REGEX_DOUBLE=147
    RBRACE=148
    RBRACKET=149
    RPAREN=150
    SEMICOLON=151
    SLASH=152
    UNDERSCORE=153
    MULTI_LINE_COMMENT=154
    SINGLE_LINE_COMMENT=155
    WHITESPACE=156
    STRING_TEXT=157
    STRING_ESCAPE_TRIGGER=158
    FULL_STRING_TEXT=159
    FULL_STRING_ESCAPE_TRIGGER=160

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.13.2")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None




    class ProgramContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.DeclarationContext)
            else:
                return self.getTypedRuleContext(HogQLParser.DeclarationContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_program

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitProgram" ):
                return visitor.visitProgram(self)
            else:
                return visitor.visitChildren(self)




    def program(self):

        localctx = HogQLParser.ProgramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 175
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -536887298) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986211001696255) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 4212759) != 0):
                self.state = 172
                self.declaration()
                self.state = 177
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 178
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DeclarationContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def varDecl(self):
            return self.getTypedRuleContext(HogQLParser.VarDeclContext,0)


        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_declaration

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDeclaration" ):
                return visitor.visitDeclaration(self)
            else:
                return visitor.visitChildren(self)




    def declaration(self):

        localctx = HogQLParser.DeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_declaration)
        try:
            self.state = 182
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [53]:
                self.enterOuterAlt(localctx, 1)
                self.state = 180
                self.varDecl()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 113, 119, 121, 129, 130, 131, 133, 140, 143, 151]:
                self.enterOuterAlt(localctx, 2)
                self.state = 181
                self.statement()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_expression

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExpression" ):
                return visitor.visitExpression(self)
            else:
                return visitor.visitChildren(self)




    def expression(self):

        localctx = HogQLParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_expression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 184
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VarDeclContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LET(self):
            return self.getToken(HogQLParser.LET, 0)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_varDecl

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarDecl" ):
                return visitor.visitVarDecl(self)
            else:
                return visitor.visitChildren(self)




    def varDecl(self):

        localctx = HogQLParser.VarDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_varDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 186
            self.match(HogQLParser.LET)
            self.state = 187
            self.identifier()
            self.state = 191
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==116:
                self.state = 188
                self.match(HogQLParser.COLON)
                self.state = 189
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 190
                self.expression()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_identifierList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIdentifierList" ):
                return visitor.visitIdentifierList(self)
            else:
                return visitor.visitChildren(self)




    def identifierList(self):

        localctx = HogQLParser.IdentifierListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_identifierList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 193
            self.identifier()
            self.state = 198
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,3,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 194
                    self.match(HogQLParser.COMMA)
                    self.state = 195
                    self.identifier() 
                self.state = 200
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,3,self._ctx)

            self.state = 202
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==117:
                self.state = 201
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def returnStmt(self):
            return self.getTypedRuleContext(HogQLParser.ReturnStmtContext,0)


        def throwStmt(self):
            return self.getTypedRuleContext(HogQLParser.ThrowStmtContext,0)


        def tryCatchStmt(self):
            return self.getTypedRuleContext(HogQLParser.TryCatchStmtContext,0)


        def ifStmt(self):
            return self.getTypedRuleContext(HogQLParser.IfStmtContext,0)


        def whileStmt(self):
            return self.getTypedRuleContext(HogQLParser.WhileStmtContext,0)


        def forInStmt(self):
            return self.getTypedRuleContext(HogQLParser.ForInStmtContext,0)


        def forStmt(self):
            return self.getTypedRuleContext(HogQLParser.ForStmtContext,0)


        def funcStmt(self):
            return self.getTypedRuleContext(HogQLParser.FuncStmtContext,0)


        def varAssignment(self):
            return self.getTypedRuleContext(HogQLParser.VarAssignmentContext,0)


        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def exprStmt(self):
            return self.getTypedRuleContext(HogQLParser.ExprStmtContext,0)


        def emptyStmt(self):
            return self.getTypedRuleContext(HogQLParser.EmptyStmtContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_statement

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStatement" ):
                return visitor.visitStatement(self)
            else:
                return visitor.visitChildren(self)




    def statement(self):

        localctx = HogQLParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_statement)
        try:
            self.state = 216
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 204
                self.returnStmt()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 205
                self.throwStmt()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 206
                self.tryCatchStmt()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 207
                self.ifStmt()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 208
                self.whileStmt()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 209
                self.forInStmt()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 210
                self.forStmt()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 211
                self.funcStmt()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 212
                self.varAssignment()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 213
                self.block()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 214
                self.exprStmt()
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 215
                self.emptyStmt()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ReturnStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def RETURN(self):
            return self.getToken(HogQLParser.RETURN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_returnStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitReturnStmt" ):
                return visitor.visitReturnStmt(self)
            else:
                return visitor.visitChildren(self)




    def returnStmt(self):

        localctx = HogQLParser.ReturnStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_returnStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 218
            self.match(HogQLParser.RETURN)
            self.state = 220
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 219
                self.expression()


            self.state = 223
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 222
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ThrowStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def THROW(self):
            return self.getToken(HogQLParser.THROW, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_throwStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitThrowStmt" ):
                return visitor.visitThrowStmt(self)
            else:
                return visitor.visitChildren(self)




    def throwStmt(self):

        localctx = HogQLParser.ThrowStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_throwStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 225
            self.match(HogQLParser.THROW)
            self.state = 227
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.state = 226
                self.expression()


            self.state = 230
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                self.state = 229
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CatchBlockContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.catchVar = None # IdentifierContext
            self.catchType = None # IdentifierContext
            self.catchStmt = None # BlockContext

        def CATCH(self):
            return self.getToken(HogQLParser.CATCH, 0)

        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_catchBlock

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitCatchBlock" ):
                return visitor.visitCatchBlock(self)
            else:
                return visitor.visitChildren(self)




    def catchBlock(self):

        localctx = HogQLParser.CatchBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_catchBlock)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 232
            self.match(HogQLParser.CATCH)
            self.state = 241
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==131:
                self.state = 233
                self.match(HogQLParser.LPAREN)
                self.state = 234
                localctx.catchVar = self.identifier()
                self.state = 237
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==116:
                    self.state = 235
                    self.match(HogQLParser.COLON)
                    self.state = 236
                    localctx.catchType = self.identifier()


                self.state = 239
                self.match(HogQLParser.RPAREN)


            self.state = 243
            localctx.catchStmt = self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TryCatchStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.tryStmt = None # BlockContext
            self.finallyStmt = None # BlockContext

        def TRY(self):
            return self.getToken(HogQLParser.TRY, 0)

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.BlockContext)
            else:
                return self.getTypedRuleContext(HogQLParser.BlockContext,i)


        def catchBlock(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.CatchBlockContext)
            else:
                return self.getTypedRuleContext(HogQLParser.CatchBlockContext,i)


        def FINALLY(self):
            return self.getToken(HogQLParser.FINALLY, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_tryCatchStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTryCatchStmt" ):
                return visitor.visitTryCatchStmt(self)
            else:
                return visitor.visitChildren(self)




    def tryCatchStmt(self):

        localctx = HogQLParser.TryCatchStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_tryCatchStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 245
            self.match(HogQLParser.TRY)
            self.state = 246
            localctx.tryStmt = self.block()
            self.state = 250
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==14:
                self.state = 247
                self.catchBlock()
                self.state = 252
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 255
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==29:
                self.state = 253
                self.match(HogQLParser.FINALLY)
                self.state = 254
                localctx.finallyStmt = self.block()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IfStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IF(self):
            return self.getToken(HogQLParser.IF, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StatementContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StatementContext,i)


        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_ifStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIfStmt" ):
                return visitor.visitIfStmt(self)
            else:
                return visitor.visitChildren(self)




    def ifStmt(self):

        localctx = HogQLParser.IfStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_ifStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 257
            self.match(HogQLParser.IF)
            self.state = 258
            self.match(HogQLParser.LPAREN)
            self.state = 259
            self.expression()
            self.state = 260
            self.match(HogQLParser.RPAREN)
            self.state = 261
            self.statement()
            self.state = 264
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.state = 262
                self.match(HogQLParser.ELSE)
                self.state = 263
                self.statement()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WhileStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WHILE(self):
            return self.getToken(HogQLParser.WHILE, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_whileStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhileStmt" ):
                return visitor.visitWhileStmt(self)
            else:
                return visitor.visitChildren(self)




    def whileStmt(self):

        localctx = HogQLParser.WhileStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_whileStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 266
            self.match(HogQLParser.WHILE)
            self.state = 267
            self.match(HogQLParser.LPAREN)
            self.state = 268
            self.expression()
            self.state = 269
            self.match(HogQLParser.RPAREN)
            self.state = 270
            self.statement()
            self.state = 272
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
            if la_ == 1:
                self.state = 271
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.initializerVarDeclr = None # VarDeclContext
            self.initializerVarAssignment = None # VarAssignmentContext
            self.initializerExpression = None # ExpressionContext
            self.condition = None # ExpressionContext
            self.incrementVarDeclr = None # VarDeclContext
            self.incrementVarAssignment = None # VarAssignmentContext
            self.incrementExpression = None # ExpressionContext

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def SEMICOLON(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.SEMICOLON)
            else:
                return self.getToken(HogQLParser.SEMICOLON, i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def varDecl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.VarDeclContext)
            else:
                return self.getTypedRuleContext(HogQLParser.VarDeclContext,i)


        def varAssignment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.VarAssignmentContext)
            else:
                return self.getTypedRuleContext(HogQLParser.VarAssignmentContext,i)


        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_forStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForStmt" ):
                return visitor.visitForStmt(self)
            else:
                return visitor.visitChildren(self)




    def forStmt(self):

        localctx = HogQLParser.ForStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_forStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self.match(HogQLParser.FOR)
            self.state = 275
            self.match(HogQLParser.LPAREN)
            self.state = 279
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
            if la_ == 1:
                self.state = 276
                localctx.initializerVarDeclr = self.varDecl()

            elif la_ == 2:
                self.state = 277
                localctx.initializerVarAssignment = self.varAssignment()

            elif la_ == 3:
                self.state = 278
                localctx.initializerExpression = self.expression()


            self.state = 281
            self.match(HogQLParser.SEMICOLON)
            self.state = 283
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                self.state = 282
                localctx.condition = self.expression()


            self.state = 285
            self.match(HogQLParser.SEMICOLON)
            self.state = 289
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
            if la_ == 1:
                self.state = 286
                localctx.incrementVarDeclr = self.varDecl()

            elif la_ == 2:
                self.state = 287
                localctx.incrementVarAssignment = self.varAssignment()

            elif la_ == 3:
                self.state = 288
                localctx.incrementExpression = self.expression()


            self.state = 291
            self.match(HogQLParser.RPAREN)
            self.state = 292
            self.statement()
            self.state = 294
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
            if la_ == 1:
                self.state = 293
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForInStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def LET(self):
            return self.getToken(HogQLParser.LET, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def IN(self):
            return self.getToken(HogQLParser.IN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_forInStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForInStmt" ):
                return visitor.visitForInStmt(self)
            else:
                return visitor.visitChildren(self)




    def forInStmt(self):

        localctx = HogQLParser.ForInStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_forInStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 296
            self.match(HogQLParser.FOR)
            self.state = 297
            self.match(HogQLParser.LPAREN)
            self.state = 298
            self.match(HogQLParser.LET)
            self.state = 299
            self.identifier()
            self.state = 302
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==117:
                self.state = 300
                self.match(HogQLParser.COMMA)
                self.state = 301
                self.identifier()


            self.state = 304
            self.match(HogQLParser.IN)
            self.state = 305
            self.expression()
            self.state = 306
            self.match(HogQLParser.RPAREN)
            self.state = 307
            self.statement()
            self.state = 309
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,21,self._ctx)
            if la_ == 1:
                self.state = 308
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FuncStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def FN(self):
            return self.getToken(HogQLParser.FN, 0)

        def FUN(self):
            return self.getToken(HogQLParser.FUN, 0)

        def identifierList(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_funcStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFuncStmt" ):
                return visitor.visitFuncStmt(self)
            else:
                return visitor.visitChildren(self)




    def funcStmt(self):

        localctx = HogQLParser.FuncStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_funcStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 311
            _la = self._input.LA(1)
            if not(_la==31 or _la==36):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 312
            self.identifier()
            self.state = 313
            self.match(HogQLParser.LPAREN)
            self.state = 315
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1450176743603191810) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 6458554974207) != 0):
                self.state = 314
                self.identifierList()


            self.state = 317
            self.match(HogQLParser.RPAREN)
            self.state = 318
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VarAssignmentContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_varAssignment

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarAssignment" ):
                return visitor.visitVarAssignment(self)
            else:
                return visitor.visitChildren(self)




    def varAssignment(self):

        localctx = HogQLParser.VarAssignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_varAssignment)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 320
            self.expression()
            self.state = 321
            self.match(HogQLParser.COLON)
            self.state = 322
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 323
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_exprStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExprStmt" ):
                return visitor.visitExprStmt(self)
            else:
                return visitor.visitChildren(self)




    def exprStmt(self):

        localctx = HogQLParser.ExprStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_exprStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 325
            self.expression()
            self.state = 327
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
            if la_ == 1:
                self.state = 326
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EmptyStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_emptyStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEmptyStmt" ):
                return visitor.visitEmptyStmt(self)
            else:
                return visitor.visitChildren(self)




    def emptyStmt(self):

        localctx = HogQLParser.EmptyStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_emptyStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 329
            self.match(HogQLParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BlockContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.DeclarationContext)
            else:
                return self.getTypedRuleContext(HogQLParser.DeclarationContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_block

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBlock" ):
                return visitor.visitBlock(self)
            else:
                return visitor.visitChildren(self)




    def block(self):

        localctx = HogQLParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 331
            self.match(HogQLParser.LBRACE)
            self.state = 335
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -536887298) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986211001696255) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 4212759) != 0):
                self.state = 332
                self.declaration()
                self.state = 337
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 338
            self.match(HogQLParser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KvPairContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_kvPair

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKvPair" ):
                return visitor.visitKvPair(self)
            else:
                return visitor.visitChildren(self)




    def kvPair(self):

        localctx = HogQLParser.KvPairContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_kvPair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 340
            self.expression()
            self.state = 341
            self.match(HogQLParser.COLON)
            self.state = 342
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KvPairListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def kvPair(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.KvPairContext)
            else:
                return self.getTypedRuleContext(HogQLParser.KvPairContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_kvPairList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKvPairList" ):
                return visitor.visitKvPairList(self)
            else:
                return visitor.visitChildren(self)




    def kvPairList(self):

        localctx = HogQLParser.KvPairListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_kvPairList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 344
            self.kvPair()
            self.state = 349
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 345
                    self.match(HogQLParser.COMMA)
                    self.state = 346
                    self.kvPair() 
                self.state = 351
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

            self.state = 353
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==117:
                self.state = 352
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def selectUnionStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectUnionStmtContext,0)


        def selectStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtContext,0)


        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_select

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelect" ):
                return visitor.visitSelect(self)
            else:
                return visitor.visitChildren(self)




    def select(self):

        localctx = HogQLParser.SelectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_select)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 358
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 355
                self.selectUnionStmt()
                pass

            elif la_ == 2:
                self.state = 356
                self.selectStmt()
                pass

            elif la_ == 3:
                self.state = 357
                self.hogqlxTagElement()
                pass


            self.state = 360
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectUnionStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def selectStmtWithParens(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.SelectStmtWithParensContext)
            else:
                return self.getTypedRuleContext(HogQLParser.SelectStmtWithParensContext,i)


        def UNION(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.UNION)
            else:
                return self.getToken(HogQLParser.UNION, i)

        def ALL(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.ALL)
            else:
                return self.getToken(HogQLParser.ALL, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_selectUnionStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectUnionStmt" ):
                return visitor.visitSelectUnionStmt(self)
            else:
                return visitor.visitChildren(self)




    def selectUnionStmt(self):

        localctx = HogQLParser.SelectUnionStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_selectUnionStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.selectStmtWithParens()
            self.state = 368
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==96:
                self.state = 363
                self.match(HogQLParser.UNION)
                self.state = 364
                self.match(HogQLParser.ALL)
                self.state = 365
                self.selectStmtWithParens()
                self.state = 370
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectStmtWithParensContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def selectStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def selectUnionStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectUnionStmtContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_selectStmtWithParens

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectStmtWithParens" ):
                return visitor.visitSelectStmtWithParens(self)
            else:
                return visitor.visitChildren(self)




    def selectStmtWithParens(self):

        localctx = HogQLParser.SelectStmtWithParensContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_selectStmtWithParens)
        try:
            self.state = 377
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [80, 103]:
                self.enterOuterAlt(localctx, 1)
                self.state = 371
                self.selectStmt()
                pass
            elif token in [131]:
                self.enterOuterAlt(localctx, 2)
                self.state = 372
                self.match(HogQLParser.LPAREN)
                self.state = 373
                self.selectUnionStmt()
                self.state = 374
                self.match(HogQLParser.RPAREN)
                pass
            elif token in [129]:
                self.enterOuterAlt(localctx, 3)
                self.state = 376
                self.placeholder()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.with_ = None # WithClauseContext
            self.columns = None # ColumnExprListContext
            self.from_ = None # FromClauseContext
            self.where = None # WhereClauseContext

        def SELECT(self):
            return self.getToken(HogQLParser.SELECT, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def topClause(self):
            return self.getTypedRuleContext(HogQLParser.TopClauseContext,0)


        def arrayJoinClause(self):
            return self.getTypedRuleContext(HogQLParser.ArrayJoinClauseContext,0)


        def prewhereClause(self):
            return self.getTypedRuleContext(HogQLParser.PrewhereClauseContext,0)


        def groupByClause(self):
            return self.getTypedRuleContext(HogQLParser.GroupByClauseContext,0)


        def WITH(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.WITH)
            else:
                return self.getToken(HogQLParser.WITH, i)

        def TOTALS(self):
            return self.getToken(HogQLParser.TOTALS, 0)

        def havingClause(self):
            return self.getTypedRuleContext(HogQLParser.HavingClauseContext,0)


        def windowClause(self):
            return self.getTypedRuleContext(HogQLParser.WindowClauseContext,0)


        def orderByClause(self):
            return self.getTypedRuleContext(HogQLParser.OrderByClauseContext,0)


        def limitAndOffsetClause(self):
            return self.getTypedRuleContext(HogQLParser.LimitAndOffsetClauseContext,0)


        def offsetOnlyClause(self):
            return self.getTypedRuleContext(HogQLParser.OffsetOnlyClauseContext,0)


        def settingsClause(self):
            return self.getTypedRuleContext(HogQLParser.SettingsClauseContext,0)


        def withClause(self):
            return self.getTypedRuleContext(HogQLParser.WithClauseContext,0)


        def fromClause(self):
            return self.getTypedRuleContext(HogQLParser.FromClauseContext,0)


        def whereClause(self):
            return self.getTypedRuleContext(HogQLParser.WhereClauseContext,0)


        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_selectStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectStmt" ):
                return visitor.visitSelectStmt(self)
            else:
                return visitor.visitChildren(self)




    def selectStmt(self):

        localctx = HogQLParser.SelectStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_selectStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==103:
                self.state = 379
                localctx.with_ = self.withClause()


            self.state = 382
            self.match(HogQLParser.SELECT)
            self.state = 384
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,31,self._ctx)
            if la_ == 1:
                self.state = 383
                self.match(HogQLParser.DISTINCT)


            self.state = 387
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
            if la_ == 1:
                self.state = 386
                self.topClause()


            self.state = 389
            localctx.columns = self.columnExprList()
            self.state = 391
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==34:
                self.state = 390
                localctx.from_ = self.fromClause()


            self.state = 394
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4538783999459360) != 0):
                self.state = 393
                self.arrayJoinClause()


            self.state = 397
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==70:
                self.state = 396
                self.prewhereClause()


            self.state = 400
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==100:
                self.state = 399
                localctx.where = self.whereClause()


            self.state = 403
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==37:
                self.state = 402
                self.groupByClause()


            self.state = 407
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,38,self._ctx)
            if la_ == 1:
                self.state = 405
                self.match(HogQLParser.WITH)
                self.state = 406
                _la = self._input.LA(1)
                if not(_la==18 or _la==75):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 411
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==103:
                self.state = 409
                self.match(HogQLParser.WITH)
                self.state = 410
                self.match(HogQLParser.TOTALS)


            self.state = 414
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==38:
                self.state = 413
                self.havingClause()


            self.state = 417
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==102:
                self.state = 416
                self.windowClause()


            self.state = 420
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==65:
                self.state = 419
                self.orderByClause()


            self.state = 424
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [55]:
                self.state = 422
                self.limitAndOffsetClause()
                pass
            elif token in [62]:
                self.state = 423
                self.offsetOnlyClause()
                pass
            elif token in [-1, 82, 96, 150]:
                pass
            else:
                pass
            self.state = 427
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==82:
                self.state = 426
                self.settingsClause()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def withExprList(self):
            return self.getTypedRuleContext(HogQLParser.WithExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_withClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithClause" ):
                return visitor.visitWithClause(self)
            else:
                return visitor.visitChildren(self)




    def withClause(self):

        localctx = HogQLParser.WithClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_withClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 429
            self.match(HogQLParser.WITH)
            self.state = 430
            self.withExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TopClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def TOP(self):
            return self.getToken(HogQLParser.TOP, 0)

        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_topClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTopClause" ):
                return visitor.visitTopClause(self)
            else:
                return visitor.visitChildren(self)




    def topClause(self):

        localctx = HogQLParser.TopClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_topClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 432
            self.match(HogQLParser.TOP)
            self.state = 433
            self.match(HogQLParser.DECIMAL_LITERAL)
            self.state = 436
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
            if la_ == 1:
                self.state = 434
                self.match(HogQLParser.WITH)
                self.state = 435
                self.match(HogQLParser.TIES)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FromClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)

        def joinExpr(self):
            return self.getTypedRuleContext(HogQLParser.JoinExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_fromClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFromClause" ):
                return visitor.visitFromClause(self)
            else:
                return visitor.visitChildren(self)




    def fromClause(self):

        localctx = HogQLParser.FromClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_fromClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 438
            self.match(HogQLParser.FROM)
            self.state = 439
            self.joinExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArrayJoinClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ARRAY(self):
            return self.getToken(HogQLParser.ARRAY, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_arrayJoinClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitArrayJoinClause" ):
                return visitor.visitArrayJoinClause(self)
            else:
                return visitor.visitChildren(self)




    def arrayJoinClause(self):

        localctx = HogQLParser.ArrayJoinClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_arrayJoinClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==45 or _la==52:
                self.state = 441
                _la = self._input.LA(1)
                if not(_la==45 or _la==52):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 444
            self.match(HogQLParser.ARRAY)
            self.state = 445
            self.match(HogQLParser.JOIN)
            self.state = 446
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WindowClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WINDOW(self):
            return self.getToken(HogQLParser.WINDOW, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def AS(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.AS)
            else:
                return self.getToken(HogQLParser.AS, i)

        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)

        def windowExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WindowExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WindowExprContext,i)


        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)

        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_windowClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWindowClause" ):
                return visitor.visitWindowClause(self)
            else:
                return visitor.visitChildren(self)




    def windowClause(self):

        localctx = HogQLParser.WindowClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_windowClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.match(HogQLParser.WINDOW)
            self.state = 449
            self.identifier()
            self.state = 450
            self.match(HogQLParser.AS)
            self.state = 451
            self.match(HogQLParser.LPAREN)
            self.state = 452
            self.windowExpr()
            self.state = 453
            self.match(HogQLParser.RPAREN)
            self.state = 463
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==117:
                self.state = 454
                self.match(HogQLParser.COMMA)
                self.state = 455
                self.identifier()
                self.state = 456
                self.match(HogQLParser.AS)
                self.state = 457
                self.match(HogQLParser.LPAREN)
                self.state = 458
                self.windowExpr()
                self.state = 459
                self.match(HogQLParser.RPAREN)
                self.state = 465
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PrewhereClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def PREWHERE(self):
            return self.getToken(HogQLParser.PREWHERE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_prewhereClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPrewhereClause" ):
                return visitor.visitPrewhereClause(self)
            else:
                return visitor.visitChildren(self)




    def prewhereClause(self):

        localctx = HogQLParser.PrewhereClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_prewhereClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 466
            self.match(HogQLParser.PREWHERE)
            self.state = 467
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WhereClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WHERE(self):
            return self.getToken(HogQLParser.WHERE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_whereClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhereClause" ):
                return visitor.visitWhereClause(self)
            else:
                return visitor.visitChildren(self)




    def whereClause(self):

        localctx = HogQLParser.WhereClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_whereClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 469
            self.match(HogQLParser.WHERE)
            self.state = 470
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GroupByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def GROUP(self):
            return self.getToken(HogQLParser.GROUP, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_groupByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitGroupByClause" ):
                return visitor.visitGroupByClause(self)
            else:
                return visitor.visitChildren(self)




    def groupByClause(self):

        localctx = HogQLParser.GroupByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_groupByClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 472
            self.match(HogQLParser.GROUP)
            self.state = 473
            self.match(HogQLParser.BY)
            self.state = 480
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.state = 474
                _la = self._input.LA(1)
                if not(_la==18 or _la==75):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 475
                self.match(HogQLParser.LPAREN)
                self.state = 476
                self.columnExprList()
                self.state = 477
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.state = 479
                self.columnExprList()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HavingClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HAVING(self):
            return self.getToken(HogQLParser.HAVING, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_havingClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHavingClause" ):
                return visitor.visitHavingClause(self)
            else:
                return visitor.visitChildren(self)




    def havingClause(self):

        localctx = HogQLParser.HavingClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_havingClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 482
            self.match(HogQLParser.HAVING)
            self.state = 483
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def orderExprList(self):
            return self.getTypedRuleContext(HogQLParser.OrderExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_orderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderByClause" ):
                return visitor.visitOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def orderByClause(self):

        localctx = HogQLParser.OrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_orderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 485
            self.match(HogQLParser.ORDER)
            self.state = 486
            self.match(HogQLParser.BY)
            self.state = 487
            self.orderExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ProjectionOrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_projectionOrderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitProjectionOrderByClause" ):
                return visitor.visitProjectionOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def projectionOrderByClause(self):

        localctx = HogQLParser.ProjectionOrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_projectionOrderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 489
            self.match(HogQLParser.ORDER)
            self.state = 490
            self.match(HogQLParser.BY)
            self.state = 491
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LimitAndOffsetClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LIMIT(self):
            return self.getToken(HogQLParser.LIMIT, 0)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_limitAndOffsetClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLimitAndOffsetClause" ):
                return visitor.visitLimitAndOffsetClause(self)
            else:
                return visitor.visitChildren(self)




    def limitAndOffsetClause(self):

        localctx = HogQLParser.LimitAndOffsetClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_limitAndOffsetClause)
        self._la = 0 # Token type
        try:
            self.state = 522
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,53,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 493
                self.match(HogQLParser.LIMIT)
                self.state = 494
                self.columnExpr(0)
                self.state = 497
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 495
                    self.match(HogQLParser.COMMA)
                    self.state = 496
                    self.columnExpr(0)


                self.state = 503
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [103]:
                    self.state = 499
                    self.match(HogQLParser.WITH)
                    self.state = 500
                    self.match(HogQLParser.TIES)
                    pass
                elif token in [11]:
                    self.state = 501
                    self.match(HogQLParser.BY)
                    self.state = 502
                    self.columnExprList()
                    pass
                elif token in [-1, 82, 96, 150]:
                    pass
                else:
                    pass
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 505
                self.match(HogQLParser.LIMIT)
                self.state = 506
                self.columnExpr(0)
                self.state = 509
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==103:
                    self.state = 507
                    self.match(HogQLParser.WITH)
                    self.state = 508
                    self.match(HogQLParser.TIES)


                self.state = 511
                self.match(HogQLParser.OFFSET)
                self.state = 512
                self.columnExpr(0)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 514
                self.match(HogQLParser.LIMIT)
                self.state = 515
                self.columnExpr(0)
                self.state = 516
                self.match(HogQLParser.OFFSET)
                self.state = 517
                self.columnExpr(0)
                self.state = 520
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==11:
                    self.state = 518
                    self.match(HogQLParser.BY)
                    self.state = 519
                    self.columnExprList()


                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OffsetOnlyClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_offsetOnlyClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOffsetOnlyClause" ):
                return visitor.visitOffsetOnlyClause(self)
            else:
                return visitor.visitChildren(self)




    def offsetOnlyClause(self):

        localctx = HogQLParser.OffsetOnlyClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_offsetOnlyClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 524
            self.match(HogQLParser.OFFSET)
            self.state = 525
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingsClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SETTINGS(self):
            return self.getToken(HogQLParser.SETTINGS, 0)

        def settingExprList(self):
            return self.getTypedRuleContext(HogQLParser.SettingExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_settingsClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingsClause" ):
                return visitor.visitSettingsClause(self)
            else:
                return visitor.visitChildren(self)




    def settingsClause(self):

        localctx = HogQLParser.SettingsClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_settingsClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 527
            self.match(HogQLParser.SETTINGS)
            self.state = 528
            self.settingExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_joinExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class JoinExprOpContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def joinExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.JoinExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.JoinExprContext,i)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)
        def joinConstraintClause(self):
            return self.getTypedRuleContext(HogQLParser.JoinConstraintClauseContext,0)

        def joinOp(self):
            return self.getTypedRuleContext(HogQLParser.JoinOpContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprOp" ):
                return visitor.visitJoinExprOp(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprTableContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableExprContext,0)

        def FINAL(self):
            return self.getToken(HogQLParser.FINAL, 0)
        def sampleClause(self):
            return self.getTypedRuleContext(HogQLParser.SampleClauseContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprTable" ):
                return visitor.visitJoinExprTable(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprParensContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def joinExpr(self):
            return self.getTypedRuleContext(HogQLParser.JoinExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprParens" ):
                return visitor.visitJoinExprParens(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprCrossOpContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def joinExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.JoinExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.JoinExprContext,i)

        def joinOpCross(self):
            return self.getTypedRuleContext(HogQLParser.JoinOpCrossContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprCrossOp" ):
                return visitor.visitJoinExprCrossOp(self)
            else:
                return visitor.visitChildren(self)



    def joinExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.JoinExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 78
        self.enterRecursionRule(localctx, 78, self.RULE_joinExpr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 542
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,56,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.JoinExprTableContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 531
                self.tableExpr(0)
                self.state = 533
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,54,self._ctx)
                if la_ == 1:
                    self.state = 532
                    self.match(HogQLParser.FINAL)


                self.state = 536
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
                if la_ == 1:
                    self.state = 535
                    self.sampleClause()


                pass

            elif la_ == 2:
                localctx = HogQLParser.JoinExprParensContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 538
                self.match(HogQLParser.LPAREN)
                self.state = 539
                self.joinExpr(0)
                self.state = 540
                self.match(HogQLParser.RPAREN)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 558
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,59,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 556
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,58,self._ctx)
                    if la_ == 1:
                        localctx = HogQLParser.JoinExprCrossOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr)
                        self.state = 544
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 545
                        self.joinOpCross()
                        self.state = 546
                        self.joinExpr(4)
                        pass

                    elif la_ == 2:
                        localctx = HogQLParser.JoinExprOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr)
                        self.state = 548
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 550
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4538818359197978) != 0) or _la==74 or _la==81:
                            self.state = 549
                            self.joinOp()


                        self.state = 552
                        self.match(HogQLParser.JOIN)
                        self.state = 553
                        self.joinExpr(0)
                        self.state = 554
                        self.joinConstraintClause()
                        pass

             
                self.state = 560
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,59,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class JoinOpContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_joinOp

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class JoinOpFullContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def FULL(self):
            return self.getToken(HogQLParser.FULL, 0)
        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpFull" ):
                return visitor.visitJoinOpFull(self)
            else:
                return visitor.visitChildren(self)


    class JoinOpInnerContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)
        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpInner" ):
                return visitor.visitJoinOpInner(self)
            else:
                return visitor.visitChildren(self)


    class JoinOpLeftRightContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)
        def RIGHT(self):
            return self.getToken(HogQLParser.RIGHT, 0)
        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)
        def SEMI(self):
            return self.getToken(HogQLParser.SEMI, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANTI(self):
            return self.getToken(HogQLParser.ANTI, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)
        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpLeftRight" ):
                return visitor.visitJoinOpLeftRight(self)
            else:
                return visitor.visitChildren(self)



    def joinOp(self):

        localctx = HogQLParser.JoinOpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_joinOp)
        self._la = 0 # Token type
        try:
            self.state = 604
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,73,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.JoinOpInnerContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 570
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,62,self._ctx)
                if la_ == 1:
                    self.state = 562
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0):
                        self.state = 561
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 564
                    self.match(HogQLParser.INNER)
                    pass

                elif la_ == 2:
                    self.state = 565
                    self.match(HogQLParser.INNER)
                    self.state = 567
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0):
                        self.state = 566
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass

                elif la_ == 3:
                    self.state = 569
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    pass


                pass

            elif la_ == 2:
                localctx = HogQLParser.JoinOpLeftRightContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 586
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,67,self._ctx)
                if la_ == 1:
                    self.state = 573
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==81:
                        self.state = 572
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==81):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 575
                    _la = self._input.LA(1)
                    if not(_la==52 or _la==74):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 577
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==66:
                        self.state = 576
                        self.match(HogQLParser.OUTER)


                    pass

                elif la_ == 2:
                    self.state = 579
                    _la = self._input.LA(1)
                    if not(_la==52 or _la==74):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 581
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==66:
                        self.state = 580
                        self.match(HogQLParser.OUTER)


                    self.state = 584
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==81:
                        self.state = 583
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==81):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass


                pass

            elif la_ == 3:
                localctx = HogQLParser.JoinOpFullContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 602
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,72,self._ctx)
                if la_ == 1:
                    self.state = 589
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==1 or _la==4:
                        self.state = 588
                        _la = self._input.LA(1)
                        if not(_la==1 or _la==4):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 591
                    self.match(HogQLParser.FULL)
                    self.state = 593
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==66:
                        self.state = 592
                        self.match(HogQLParser.OUTER)


                    pass

                elif la_ == 2:
                    self.state = 595
                    self.match(HogQLParser.FULL)
                    self.state = 597
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==66:
                        self.state = 596
                        self.match(HogQLParser.OUTER)


                    self.state = 600
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==1 or _la==4:
                        self.state = 599
                        _la = self._input.LA(1)
                        if not(_la==1 or _la==4):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass


                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinOpCrossContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CROSS(self):
            return self.getToken(HogQLParser.CROSS, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_joinOpCross

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpCross" ):
                return visitor.visitJoinOpCross(self)
            else:
                return visitor.visitChildren(self)




    def joinOpCross(self):

        localctx = HogQLParser.JoinOpCrossContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_joinOpCross)
        try:
            self.state = 609
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [17]:
                self.enterOuterAlt(localctx, 1)
                self.state = 606
                self.match(HogQLParser.CROSS)
                self.state = 607
                self.match(HogQLParser.JOIN)
                pass
            elif token in [117]:
                self.enterOuterAlt(localctx, 2)
                self.state = 608
                self.match(HogQLParser.COMMA)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinConstraintClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ON(self):
            return self.getToken(HogQLParser.ON, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def USING(self):
            return self.getToken(HogQLParser.USING, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_joinConstraintClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinConstraintClause" ):
                return visitor.visitJoinConstraintClause(self)
            else:
                return visitor.visitChildren(self)




    def joinConstraintClause(self):

        localctx = HogQLParser.JoinConstraintClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_joinConstraintClause)
        try:
            self.state = 620
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 611
                self.match(HogQLParser.ON)
                self.state = 612
                self.columnExprList()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 613
                self.match(HogQLParser.USING)
                self.state = 614
                self.match(HogQLParser.LPAREN)
                self.state = 615
                self.columnExprList()
                self.state = 616
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 618
                self.match(HogQLParser.USING)
                self.state = 619
                self.columnExprList()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SampleClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SAMPLE(self):
            return self.getToken(HogQLParser.SAMPLE, 0)

        def ratioExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.RatioExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.RatioExprContext,i)


        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_sampleClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSampleClause" ):
                return visitor.visitSampleClause(self)
            else:
                return visitor.visitChildren(self)




    def sampleClause(self):

        localctx = HogQLParser.SampleClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_sampleClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 622
            self.match(HogQLParser.SAMPLE)
            self.state = 623
            self.ratioExpr()
            self.state = 626
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,76,self._ctx)
            if la_ == 1:
                self.state = 624
                self.match(HogQLParser.OFFSET)
                self.state = 625
                self.ratioExpr()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def orderExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.OrderExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.OrderExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_orderExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderExprList" ):
                return visitor.visitOrderExprList(self)
            else:
                return visitor.visitChildren(self)




    def orderExprList(self):

        localctx = HogQLParser.OrderExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_orderExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 628
            self.orderExpr()
            self.state = 633
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==117:
                self.state = 629
                self.match(HogQLParser.COMMA)
                self.state = 630
                self.orderExpr()
                self.state = 635
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def NULLS(self):
            return self.getToken(HogQLParser.NULLS, 0)

        def COLLATE(self):
            return self.getToken(HogQLParser.COLLATE, 0)

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def ASCENDING(self):
            return self.getToken(HogQLParser.ASCENDING, 0)

        def DESCENDING(self):
            return self.getToken(HogQLParser.DESCENDING, 0)

        def DESC(self):
            return self.getToken(HogQLParser.DESC, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def LAST(self):
            return self.getToken(HogQLParser.LAST, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_orderExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderExpr" ):
                return visitor.visitOrderExpr(self)
            else:
                return visitor.visitChildren(self)




    def orderExpr(self):

        localctx = HogQLParser.OrderExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_orderExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 636
            self.columnExpr(0)
            self.state = 638
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0):
                self.state = 637
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 642
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==61:
                self.state = 640
                self.match(HogQLParser.NULLS)
                self.state = 641
                _la = self._input.LA(1)
                if not(_la==30 or _la==50):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 646
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==16:
                self.state = 644
                self.match(HogQLParser.COLLATE)
                self.state = 645
                self.match(HogQLParser.STRING_LITERAL)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RatioExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def numberLiteral(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.NumberLiteralContext)
            else:
                return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,i)


        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_ratioExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitRatioExpr" ):
                return visitor.visitRatioExpr(self)
            else:
                return visitor.visitChildren(self)




    def ratioExpr(self):

        localctx = HogQLParser.RatioExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_ratioExpr)
        try:
            self.state = 654
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [129]:
                self.enterOuterAlt(localctx, 1)
                self.state = 648
                self.placeholder()
                pass
            elif token in [44, 58, 107, 108, 109, 110, 119, 121, 140]:
                self.enterOuterAlt(localctx, 2)
                self.state = 649
                self.numberLiteral()
                self.state = 652
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,81,self._ctx)
                if la_ == 1:
                    self.state = 650
                    self.match(HogQLParser.SLASH)
                    self.state = 651
                    self.numberLiteral()


                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def settingExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.SettingExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.SettingExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_settingExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingExprList" ):
                return visitor.visitSettingExprList(self)
            else:
                return visitor.visitChildren(self)




    def settingExprList(self):

        localctx = HogQLParser.SettingExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_settingExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 656
            self.settingExpr()
            self.state = 661
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==117:
                self.state = 657
                self.match(HogQLParser.COMMA)
                self.state = 658
                self.settingExpr()
                self.state = 663
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def literal(self):
            return self.getTypedRuleContext(HogQLParser.LiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_settingExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingExpr" ):
                return visitor.visitSettingExpr(self)
            else:
                return visitor.visitChildren(self)




    def settingExpr(self):

        localctx = HogQLParser.SettingExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_settingExpr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 664
            self.identifier()
            self.state = 665
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 666
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WindowExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def winPartitionByClause(self):
            return self.getTypedRuleContext(HogQLParser.WinPartitionByClauseContext,0)


        def winOrderByClause(self):
            return self.getTypedRuleContext(HogQLParser.WinOrderByClauseContext,0)


        def winFrameClause(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameClauseContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_windowExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWindowExpr" ):
                return visitor.visitWindowExpr(self)
            else:
                return visitor.visitChildren(self)




    def windowExpr(self):

        localctx = HogQLParser.WindowExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_windowExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 669
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==68:
                self.state = 668
                self.winPartitionByClause()


            self.state = 672
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==65:
                self.state = 671
                self.winOrderByClause()


            self.state = 675
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==72 or _la==77:
                self.state = 674
                self.winFrameClause()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinPartitionByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def PARTITION(self):
            return self.getToken(HogQLParser.PARTITION, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winPartitionByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinPartitionByClause" ):
                return visitor.visitWinPartitionByClause(self)
            else:
                return visitor.visitChildren(self)




    def winPartitionByClause(self):

        localctx = HogQLParser.WinPartitionByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_winPartitionByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 677
            self.match(HogQLParser.PARTITION)
            self.state = 678
            self.match(HogQLParser.BY)
            self.state = 679
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinOrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def orderExprList(self):
            return self.getTypedRuleContext(HogQLParser.OrderExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winOrderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinOrderByClause" ):
                return visitor.visitWinOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def winOrderByClause(self):

        localctx = HogQLParser.WinOrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_winOrderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 681
            self.match(HogQLParser.ORDER)
            self.state = 682
            self.match(HogQLParser.BY)
            self.state = 683
            self.orderExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def winFrameExtend(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameExtendContext,0)


        def ROWS(self):
            return self.getToken(HogQLParser.ROWS, 0)

        def RANGE(self):
            return self.getToken(HogQLParser.RANGE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinFrameClause" ):
                return visitor.visitWinFrameClause(self)
            else:
                return visitor.visitChildren(self)




    def winFrameClause(self):

        localctx = HogQLParser.WinFrameClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_winFrameClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 685
            _la = self._input.LA(1)
            if not(_la==72 or _la==77):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 686
            self.winFrameExtend()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameExtendContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameExtend

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class FrameStartContext(WinFrameExtendContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WinFrameExtendContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def winFrameBound(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameBoundContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFrameStart" ):
                return visitor.visitFrameStart(self)
            else:
                return visitor.visitChildren(self)


    class FrameBetweenContext(WinFrameExtendContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WinFrameExtendContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)
        def winFrameBound(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WinFrameBoundContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WinFrameBoundContext,i)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFrameBetween" ):
                return visitor.visitFrameBetween(self)
            else:
                return visitor.visitChildren(self)



    def winFrameExtend(self):

        localctx = HogQLParser.WinFrameExtendContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_winFrameExtend)
        try:
            self.state = 694
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [19, 44, 58, 95, 107, 108, 109, 110, 119, 121, 140]:
                localctx = HogQLParser.FrameStartContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 688
                self.winFrameBound()
                pass
            elif token in [9]:
                localctx = HogQLParser.FrameBetweenContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 689
                self.match(HogQLParser.BETWEEN)
                self.state = 690
                self.winFrameBound()
                self.state = 691
                self.match(HogQLParser.AND)
                self.state = 692
                self.winFrameBound()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameBoundContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CURRENT(self):
            return self.getToken(HogQLParser.CURRENT, 0)

        def ROW(self):
            return self.getToken(HogQLParser.ROW, 0)

        def UNBOUNDED(self):
            return self.getToken(HogQLParser.UNBOUNDED, 0)

        def PRECEDING(self):
            return self.getToken(HogQLParser.PRECEDING, 0)

        def FOLLOWING(self):
            return self.getToken(HogQLParser.FOLLOWING, 0)

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameBound

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinFrameBound" ):
                return visitor.visitWinFrameBound(self)
            else:
                return visitor.visitChildren(self)




    def winFrameBound(self):

        localctx = HogQLParser.WinFrameBoundContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_winFrameBound)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 708
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,88,self._ctx)
            if la_ == 1:
                self.state = 696
                self.match(HogQLParser.CURRENT)
                self.state = 697
                self.match(HogQLParser.ROW)
                pass

            elif la_ == 2:
                self.state = 698
                self.match(HogQLParser.UNBOUNDED)
                self.state = 699
                self.match(HogQLParser.PRECEDING)
                pass

            elif la_ == 3:
                self.state = 700
                self.match(HogQLParser.UNBOUNDED)
                self.state = 701
                self.match(HogQLParser.FOLLOWING)
                pass

            elif la_ == 4:
                self.state = 702
                self.numberLiteral()
                self.state = 703
                self.match(HogQLParser.PRECEDING)
                pass

            elif la_ == 5:
                self.state = 705
                self.numberLiteral()
                self.state = 706
                self.match(HogQLParser.FOLLOWING)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_expr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExpr" ):
                return visitor.visitExpr(self)
            else:
                return visitor.visitChildren(self)




    def expr(self):

        localctx = HogQLParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 710
            self.columnExpr(0)
            self.state = 711
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnTypeExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_columnTypeExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class ColumnTypeExprNestedContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnTypeExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnTypeExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprNested" ):
                return visitor.visitColumnTypeExprNested(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprParamContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprParam" ):
                return visitor.visitColumnTypeExprParam(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprSimpleContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprSimple" ):
                return visitor.visitColumnTypeExprSimple(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprComplexContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnTypeExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnTypeExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprComplex" ):
                return visitor.visitColumnTypeExprComplex(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprEnumContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def enumValue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.EnumValueContext)
            else:
                return self.getTypedRuleContext(HogQLParser.EnumValueContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprEnum" ):
                return visitor.visitColumnTypeExprEnum(self)
            else:
                return visitor.visitChildren(self)



    def columnTypeExpr(self):

        localctx = HogQLParser.ColumnTypeExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_columnTypeExpr)
        self._la = 0 # Token type
        try:
            self.state = 769
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,96,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.ColumnTypeExprSimpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 713
                self.identifier()
                pass

            elif la_ == 2:
                localctx = HogQLParser.ColumnTypeExprNestedContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 714
                self.identifier()
                self.state = 715
                self.match(HogQLParser.LPAREN)
                self.state = 716
                self.identifier()
                self.state = 717
                self.columnTypeExpr()
                self.state = 724
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,89,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 718
                        self.match(HogQLParser.COMMA)
                        self.state = 719
                        self.identifier()
                        self.state = 720
                        self.columnTypeExpr() 
                    self.state = 726
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,89,self._ctx)

                self.state = 728
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 727
                    self.match(HogQLParser.COMMA)


                self.state = 730
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                localctx = HogQLParser.ColumnTypeExprEnumContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 732
                self.identifier()
                self.state = 733
                self.match(HogQLParser.LPAREN)
                self.state = 734
                self.enumValue()
                self.state = 739
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,91,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 735
                        self.match(HogQLParser.COMMA)
                        self.state = 736
                        self.enumValue() 
                    self.state = 741
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,91,self._ctx)

                self.state = 743
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 742
                    self.match(HogQLParser.COMMA)


                self.state = 745
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = HogQLParser.ColumnTypeExprComplexContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 747
                self.identifier()
                self.state = 748
                self.match(HogQLParser.LPAREN)
                self.state = 749
                self.columnTypeExpr()
                self.state = 754
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,93,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 750
                        self.match(HogQLParser.COMMA)
                        self.state = 751
                        self.columnTypeExpr() 
                    self.state = 756
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,93,self._ctx)

                self.state = 758
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 757
                    self.match(HogQLParser.COMMA)


                self.state = 760
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 5:
                localctx = HogQLParser.ColumnTypeExprParamContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 762
                self.identifier()
                self.state = 763
                self.match(HogQLParser.LPAREN)
                self.state = 765
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 764
                    self.columnExprList()


                self.state = 767
                self.match(HogQLParser.RPAREN)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprList" ):
                return visitor.visitColumnExprList(self)
            else:
                return visitor.visitChildren(self)




    def columnExprList(self):

        localctx = HogQLParser.ColumnExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_columnExprList)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 771
            self.columnExpr(0)
            self.state = 776
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,97,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 772
                    self.match(HogQLParser.COMMA)
                    self.state = 773
                    self.columnExpr(0) 
                self.state = 778
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,97,self._ctx)

            self.state = 780
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,98,self._ctx)
            if la_ == 1:
                self.state = 779
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_columnExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class ColumnExprTernaryOpContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def QUERY(self):
            return self.getToken(HogQLParser.QUERY, 0)
        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTernaryOp" ):
                return visitor.visitColumnExprTernaryOp(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAliasContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAlias" ):
                return visitor.visitColumnExprAlias(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNegateContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNegate" ):
                return visitor.visitColumnExprNegate(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprDictContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)
        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)
        def kvPairList(self):
            return self.getTypedRuleContext(HogQLParser.KvPairListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprDict" ):
                return visitor.visitColumnExprDict(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprSubqueryContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectUnionStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectUnionStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprSubquery" ):
                return visitor.visitColumnExprSubquery(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprLiteralContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def literal(self):
            return self.getTypedRuleContext(HogQLParser.LiteralContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprLiteral" ):
                return visitor.visitColumnExprLiteral(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprArrayContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprArray" ):
                return visitor.visitColumnExprArray(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprSubstringContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def SUBSTRING(self):
            return self.getToken(HogQLParser.SUBSTRING, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprSubstring" ):
                return visitor.visitColumnExprSubstring(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCastContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def CAST(self):
            return self.getToken(HogQLParser.CAST, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def columnTypeExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCast" ):
                return visitor.visitColumnExprCast(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprOrContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def OR(self):
            return self.getToken(HogQLParser.OR, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprOr" ):
                return visitor.visitColumnExprOr(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullTupleAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullTupleAccess" ):
                return visitor.visitColumnExprNullTupleAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence1Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def ASTERISK(self):
            return self.getToken(HogQLParser.ASTERISK, 0)
        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)
        def PERCENT(self):
            return self.getToken(HogQLParser.PERCENT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence1" ):
                return visitor.visitColumnExprPrecedence1(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence2Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def PLUS(self):
            return self.getToken(HogQLParser.PLUS, 0)
        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)
        def CONCAT(self):
            return self.getToken(HogQLParser.CONCAT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence2" ):
                return visitor.visitColumnExprPrecedence2(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence3Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def IN(self):
            return self.getToken(HogQLParser.IN, 0)
        def EQ_DOUBLE(self):
            return self.getToken(HogQLParser.EQ_DOUBLE, 0)
        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)
        def NOT_EQ(self):
            return self.getToken(HogQLParser.NOT_EQ, 0)
        def LT_EQ(self):
            return self.getToken(HogQLParser.LT_EQ, 0)
        def LT(self):
            return self.getToken(HogQLParser.LT, 0)
        def GT_EQ(self):
            return self.getToken(HogQLParser.GT_EQ, 0)
        def GT(self):
            return self.getToken(HogQLParser.GT, 0)
        def LIKE(self):
            return self.getToken(HogQLParser.LIKE, 0)
        def ILIKE(self):
            return self.getToken(HogQLParser.ILIKE, 0)
        def REGEX_SINGLE(self):
            return self.getToken(HogQLParser.REGEX_SINGLE, 0)
        def REGEX_DOUBLE(self):
            return self.getToken(HogQLParser.REGEX_DOUBLE, 0)
        def NOT_REGEX(self):
            return self.getToken(HogQLParser.NOT_REGEX, 0)
        def IREGEX_SINGLE(self):
            return self.getToken(HogQLParser.IREGEX_SINGLE, 0)
        def IREGEX_DOUBLE(self):
            return self.getToken(HogQLParser.IREGEX_DOUBLE, 0)
        def NOT_IREGEX(self):
            return self.getToken(HogQLParser.NOT_IREGEX, 0)
        def COHORT(self):
            return self.getToken(HogQLParser.COHORT, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence3" ):
                return visitor.visitColumnExprPrecedence3(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIntervalContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INTERVAL(self):
            return self.getToken(HogQLParser.INTERVAL, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def interval(self):
            return self.getTypedRuleContext(HogQLParser.IntervalContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprInterval" ):
                return visitor.visitColumnExprInterval(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIsNullContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def IS(self):
            return self.getToken(HogQLParser.IS, 0)
        def NULL_SQL(self):
            return self.getToken(HogQLParser.NULL_SQL, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprIsNull" ):
                return visitor.visitColumnExprIsNull(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprWinFunctionTargetContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprWinFunctionTarget" ):
                return visitor.visitColumnExprWinFunctionTarget(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullPropertyAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullPropertyAccess" ):
                return visitor.visitColumnExprNullPropertyAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTrimContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def TRIM(self):
            return self.getToken(HogQLParser.TRIM, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def BOTH(self):
            return self.getToken(HogQLParser.BOTH, 0)
        def LEADING(self):
            return self.getToken(HogQLParser.LEADING, 0)
        def TRAILING(self):
            return self.getToken(HogQLParser.TRAILING, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTrim" ):
                return visitor.visitColumnExprTrim(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTagElementContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTagElement" ):
                return visitor.visitColumnExprTagElement(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTemplateStringContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def templateString(self):
            return self.getTypedRuleContext(HogQLParser.TemplateStringContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTemplateString" ):
                return visitor.visitColumnExprTemplateString(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTupleContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTuple" ):
                return visitor.visitColumnExprTuple(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCallContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCall" ):
                return visitor.visitColumnExprCall(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprArrayAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprArrayAccess" ):
                return visitor.visitColumnExprArrayAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprBetweenContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)
        def AND(self):
            return self.getToken(HogQLParser.AND, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprBetween" ):
                return visitor.visitColumnExprBetween(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPropertyAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPropertyAccess" ):
                return visitor.visitColumnExprPropertyAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprParensContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprParens" ):
                return visitor.visitColumnExprParens(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullArrayAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullArrayAccess" ):
                return visitor.visitColumnExprNullArrayAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTimestampContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def TIMESTAMP(self):
            return self.getToken(HogQLParser.TIMESTAMP, 0)
        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTimestamp" ):
                return visitor.visitColumnExprTimestamp(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullishContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def NULLISH(self):
            return self.getToken(HogQLParser.NULLISH, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullish" ):
                return visitor.visitColumnExprNullish(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAndContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAnd" ):
                return visitor.visitColumnExprAnd(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTupleAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)
        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTupleAccess" ):
                return visitor.visitColumnExprTupleAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCaseContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.caseExpr = None # ColumnExprContext
            self.whenExpr = None # ColumnExprContext
            self.thenExpr = None # ColumnExprContext
            self.elseExpr = None # ColumnExprContext
            self.copyFrom(ctx)

        def CASE(self):
            return self.getToken(HogQLParser.CASE, 0)
        def END(self):
            return self.getToken(HogQLParser.END, 0)
        def WHEN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.WHEN)
            else:
                return self.getToken(HogQLParser.WHEN, i)
        def THEN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.THEN)
            else:
                return self.getToken(HogQLParser.THEN, i)
        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)
        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCase" ):
                return visitor.visitColumnExprCase(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprDateContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)
        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprDate" ):
                return visitor.visitColumnExprDate(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNotContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNot" ):
                return visitor.visitColumnExprNot(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprWinFunctionContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def windowExpr(self):
            return self.getTypedRuleContext(HogQLParser.WindowExprContext,0)

        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprWinFunction" ):
                return visitor.visitColumnExprWinFunction(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprLambdaContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnLambdaExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnLambdaExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprLambda" ):
                return visitor.visitColumnExprLambda(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIdentifierContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.ColumnIdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprIdentifier" ):
                return visitor.visitColumnExprIdentifier(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprFunctionContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprFunction" ):
                return visitor.visitColumnExprFunction(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAsteriskContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def ASTERISK(self):
            return self.getToken(HogQLParser.ASTERISK, 0)
        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAsterisk" ):
                return visitor.visitColumnExprAsterisk(self)
            else:
                return visitor.visitChildren(self)



    def columnExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.ColumnExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 116
        self.enterRecursionRule(localctx, 116, self.RULE_columnExpr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 932
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,118,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.ColumnExprCaseContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 783
                self.match(HogQLParser.CASE)
                self.state = 785
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,99,self._ctx)
                if la_ == 1:
                    self.state = 784
                    localctx.caseExpr = self.columnExpr(0)


                self.state = 792 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 787
                    self.match(HogQLParser.WHEN)
                    self.state = 788
                    localctx.whenExpr = self.columnExpr(0)
                    self.state = 789
                    self.match(HogQLParser.THEN)
                    self.state = 790
                    localctx.thenExpr = self.columnExpr(0)
                    self.state = 794 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==99):
                        break

                self.state = 798
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==25:
                    self.state = 796
                    self.match(HogQLParser.ELSE)
                    self.state = 797
                    localctx.elseExpr = self.columnExpr(0)


                self.state = 800
                self.match(HogQLParser.END)
                pass

            elif la_ == 2:
                localctx = HogQLParser.ColumnExprCastContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 802
                self.match(HogQLParser.CAST)
                self.state = 803
                self.match(HogQLParser.LPAREN)
                self.state = 804
                self.columnExpr(0)
                self.state = 805
                self.match(HogQLParser.AS)
                self.state = 806
                self.columnTypeExpr()
                self.state = 807
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                localctx = HogQLParser.ColumnExprDateContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 809
                self.match(HogQLParser.DATE)
                self.state = 810
                self.match(HogQLParser.STRING_LITERAL)
                pass

            elif la_ == 4:
                localctx = HogQLParser.ColumnExprIntervalContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 811
                self.match(HogQLParser.INTERVAL)
                self.state = 812
                self.columnExpr(0)
                self.state = 813
                self.interval()
                pass

            elif la_ == 5:
                localctx = HogQLParser.ColumnExprSubstringContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 815
                self.match(HogQLParser.SUBSTRING)
                self.state = 816
                self.match(HogQLParser.LPAREN)
                self.state = 817
                self.columnExpr(0)
                self.state = 818
                self.match(HogQLParser.FROM)
                self.state = 819
                self.columnExpr(0)
                self.state = 822
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==33:
                    self.state = 820
                    self.match(HogQLParser.FOR)
                    self.state = 821
                    self.columnExpr(0)


                self.state = 824
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 6:
                localctx = HogQLParser.ColumnExprTimestampContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 826
                self.match(HogQLParser.TIMESTAMP)
                self.state = 827
                self.match(HogQLParser.STRING_LITERAL)
                pass

            elif la_ == 7:
                localctx = HogQLParser.ColumnExprTrimContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 828
                self.match(HogQLParser.TRIM)
                self.state = 829
                self.match(HogQLParser.LPAREN)
                self.state = 830
                _la = self._input.LA(1)
                if not(_la==10 or _la==51 or _la==91):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 831
                self.string()
                self.state = 832
                self.match(HogQLParser.FROM)
                self.state = 833
                self.columnExpr(0)
                self.state = 834
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 8:
                localctx = HogQLParser.ColumnExprWinFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 836
                self.identifier()

                self.state = 837
                self.match(HogQLParser.LPAREN)
                self.state = 839
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 838
                    localctx.columnExprs = self.columnExprList()


                self.state = 841
                self.match(HogQLParser.RPAREN)
                self.state = 851
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==131:
                    self.state = 843
                    self.match(HogQLParser.LPAREN)
                    self.state = 845
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,104,self._ctx)
                    if la_ == 1:
                        self.state = 844
                        self.match(HogQLParser.DISTINCT)


                    self.state = 848
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                        self.state = 847
                        localctx.columnArgList = self.columnExprList()


                    self.state = 850
                    self.match(HogQLParser.RPAREN)


                self.state = 853
                self.match(HogQLParser.OVER)
                self.state = 854
                self.match(HogQLParser.LPAREN)
                self.state = 855
                self.windowExpr()
                self.state = 856
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 9:
                localctx = HogQLParser.ColumnExprWinFunctionTargetContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 858
                self.identifier()

                self.state = 859
                self.match(HogQLParser.LPAREN)
                self.state = 861
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 860
                    localctx.columnExprs = self.columnExprList()


                self.state = 863
                self.match(HogQLParser.RPAREN)
                self.state = 873
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==131:
                    self.state = 865
                    self.match(HogQLParser.LPAREN)
                    self.state = 867
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,108,self._ctx)
                    if la_ == 1:
                        self.state = 866
                        self.match(HogQLParser.DISTINCT)


                    self.state = 870
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                        self.state = 869
                        localctx.columnArgList = self.columnExprList()


                    self.state = 872
                    self.match(HogQLParser.RPAREN)


                self.state = 875
                self.match(HogQLParser.OVER)
                self.state = 876
                self.identifier()
                pass

            elif la_ == 10:
                localctx = HogQLParser.ColumnExprFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 878
                self.identifier()
                self.state = 884
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,112,self._ctx)
                if la_ == 1:
                    self.state = 879
                    self.match(HogQLParser.LPAREN)
                    self.state = 881
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                        self.state = 880
                        localctx.columnExprs = self.columnExprList()


                    self.state = 883
                    self.match(HogQLParser.RPAREN)


                self.state = 886
                self.match(HogQLParser.LPAREN)
                self.state = 888
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,113,self._ctx)
                if la_ == 1:
                    self.state = 887
                    self.match(HogQLParser.DISTINCT)


                self.state = 891
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 890
                    localctx.columnArgList = self.columnExprList()


                self.state = 893
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 11:
                localctx = HogQLParser.ColumnExprTagElementContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 895
                self.hogqlxTagElement()
                pass

            elif la_ == 12:
                localctx = HogQLParser.ColumnExprTemplateStringContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 896
                self.templateString()
                pass

            elif la_ == 13:
                localctx = HogQLParser.ColumnExprLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 897
                self.literal()
                pass

            elif la_ == 14:
                localctx = HogQLParser.ColumnExprNegateContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 898
                self.match(HogQLParser.DASH)
                self.state = 899
                self.columnExpr(20)
                pass

            elif la_ == 15:
                localctx = HogQLParser.ColumnExprNotContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 900
                self.match(HogQLParser.NOT)
                self.state = 901
                self.columnExpr(14)
                pass

            elif la_ == 16:
                localctx = HogQLParser.ColumnExprAsteriskContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 905
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1450176743603191810) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 6458554974207) != 0):
                    self.state = 902
                    self.tableIdentifier()
                    self.state = 903
                    self.match(HogQLParser.DOT)


                self.state = 907
                self.match(HogQLParser.ASTERISK)
                pass

            elif la_ == 17:
                localctx = HogQLParser.ColumnExprSubqueryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 908
                self.match(HogQLParser.LPAREN)
                self.state = 909
                self.selectUnionStmt()
                self.state = 910
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 18:
                localctx = HogQLParser.ColumnExprParensContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 912
                self.match(HogQLParser.LPAREN)
                self.state = 913
                self.columnExpr(0)
                self.state = 914
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 19:
                localctx = HogQLParser.ColumnExprTupleContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 916
                self.match(HogQLParser.LPAREN)
                self.state = 917
                self.columnExprList()
                self.state = 918
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 20:
                localctx = HogQLParser.ColumnExprArrayContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 920
                self.match(HogQLParser.LBRACKET)
                self.state = 922
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 921
                    self.columnExprList()


                self.state = 924
                self.match(HogQLParser.RBRACKET)
                pass

            elif la_ == 21:
                localctx = HogQLParser.ColumnExprDictContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 925
                self.match(HogQLParser.LBRACE)
                self.state = 927
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                    self.state = 926
                    self.kvPairList()


                self.state = 929
                self.match(HogQLParser.RBRACE)
                pass

            elif la_ == 22:
                localctx = HogQLParser.ColumnExprLambdaContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 930
                self.columnLambdaExpr()
                pass

            elif la_ == 23:
                localctx = HogQLParser.ColumnExprIdentifierContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 931
                self.columnIdentifier()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 1044
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,130,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 1042
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,129,self._ctx)
                    if la_ == 1:
                        localctx = HogQLParser.ColumnExprPrecedence1Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 934
                        if not self.precpred(self._ctx, 19):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 19)")
                        self.state = 938
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [113]:
                            self.state = 935
                            localctx.operator = self.match(HogQLParser.ASTERISK)
                            pass
                        elif token in [152]:
                            self.state = 936
                            localctx.operator = self.match(HogQLParser.SLASH)
                            pass
                        elif token in [139]:
                            self.state = 937
                            localctx.operator = self.match(HogQLParser.PERCENT)
                            pass
                        else:
                            raise NoViableAltException(self)

                        self.state = 940
                        localctx.right = self.columnExpr(20)
                        pass

                    elif la_ == 2:
                        localctx = HogQLParser.ColumnExprPrecedence2Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 941
                        if not self.precpred(self._ctx, 18):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 18)")
                        self.state = 945
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [140]:
                            self.state = 942
                            localctx.operator = self.match(HogQLParser.PLUS)
                            pass
                        elif token in [119]:
                            self.state = 943
                            localctx.operator = self.match(HogQLParser.DASH)
                            pass
                        elif token in [118]:
                            self.state = 944
                            localctx.operator = self.match(HogQLParser.CONCAT)
                            pass
                        else:
                            raise NoViableAltException(self)

                        self.state = 947
                        localctx.right = self.columnExpr(19)
                        pass

                    elif la_ == 3:
                        localctx = HogQLParser.ColumnExprPrecedence3Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 948
                        if not self.precpred(self._ctx, 17):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 17)")
                        self.state = 973
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,124,self._ctx)
                        if la_ == 1:
                            self.state = 949
                            localctx.operator = self.match(HogQLParser.EQ_DOUBLE)
                            pass

                        elif la_ == 2:
                            self.state = 950
                            localctx.operator = self.match(HogQLParser.EQ_SINGLE)
                            pass

                        elif la_ == 3:
                            self.state = 951
                            localctx.operator = self.match(HogQLParser.NOT_EQ)
                            pass

                        elif la_ == 4:
                            self.state = 952
                            localctx.operator = self.match(HogQLParser.LT_EQ)
                            pass

                        elif la_ == 5:
                            self.state = 953
                            localctx.operator = self.match(HogQLParser.LT)
                            pass

                        elif la_ == 6:
                            self.state = 954
                            localctx.operator = self.match(HogQLParser.GT_EQ)
                            pass

                        elif la_ == 7:
                            self.state = 955
                            localctx.operator = self.match(HogQLParser.GT)
                            pass

                        elif la_ == 8:
                            self.state = 957
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==59:
                                self.state = 956
                                localctx.operator = self.match(HogQLParser.NOT)


                            self.state = 959
                            self.match(HogQLParser.IN)
                            self.state = 961
                            self._errHandler.sync(self)
                            la_ = self._interp.adaptivePredict(self._input,122,self._ctx)
                            if la_ == 1:
                                self.state = 960
                                self.match(HogQLParser.COHORT)


                            pass

                        elif la_ == 9:
                            self.state = 964
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==59:
                                self.state = 963
                                localctx.operator = self.match(HogQLParser.NOT)


                            self.state = 966
                            _la = self._input.LA(1)
                            if not(_la==42 or _la==54):
                                self._errHandler.recoverInline(self)
                            else:
                                self._errHandler.reportMatch(self)
                                self.consume()
                            pass

                        elif la_ == 10:
                            self.state = 967
                            localctx.operator = self.match(HogQLParser.REGEX_SINGLE)
                            pass

                        elif la_ == 11:
                            self.state = 968
                            localctx.operator = self.match(HogQLParser.REGEX_DOUBLE)
                            pass

                        elif la_ == 12:
                            self.state = 969
                            localctx.operator = self.match(HogQLParser.NOT_REGEX)
                            pass

                        elif la_ == 13:
                            self.state = 970
                            localctx.operator = self.match(HogQLParser.IREGEX_SINGLE)
                            pass

                        elif la_ == 14:
                            self.state = 971
                            localctx.operator = self.match(HogQLParser.IREGEX_DOUBLE)
                            pass

                        elif la_ == 15:
                            self.state = 972
                            localctx.operator = self.match(HogQLParser.NOT_IREGEX)
                            pass


                        self.state = 975
                        localctx.right = self.columnExpr(18)
                        pass

                    elif la_ == 4:
                        localctx = HogQLParser.ColumnExprNullishContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 976
                        if not self.precpred(self._ctx, 15):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 15)")
                        self.state = 977
                        self.match(HogQLParser.NULLISH)
                        self.state = 978
                        self.columnExpr(16)
                        pass

                    elif la_ == 5:
                        localctx = HogQLParser.ColumnExprAndContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 979
                        if not self.precpred(self._ctx, 13):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 13)")
                        self.state = 980
                        self.match(HogQLParser.AND)
                        self.state = 981
                        self.columnExpr(14)
                        pass

                    elif la_ == 6:
                        localctx = HogQLParser.ColumnExprOrContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 982
                        if not self.precpred(self._ctx, 12):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 12)")
                        self.state = 983
                        self.match(HogQLParser.OR)
                        self.state = 984
                        self.columnExpr(13)
                        pass

                    elif la_ == 7:
                        localctx = HogQLParser.ColumnExprBetweenContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 985
                        if not self.precpred(self._ctx, 11):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 11)")
                        self.state = 987
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 986
                            self.match(HogQLParser.NOT)


                        self.state = 989
                        self.match(HogQLParser.BETWEEN)
                        self.state = 990
                        self.columnExpr(0)
                        self.state = 991
                        self.match(HogQLParser.AND)
                        self.state = 992
                        self.columnExpr(12)
                        pass

                    elif la_ == 8:
                        localctx = HogQLParser.ColumnExprTernaryOpContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 994
                        if not self.precpred(self._ctx, 10):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 10)")
                        self.state = 995
                        self.match(HogQLParser.QUERY)
                        self.state = 996
                        self.columnExpr(0)
                        self.state = 997
                        self.match(HogQLParser.COLON)
                        self.state = 998
                        self.columnExpr(10)
                        pass

                    elif la_ == 9:
                        localctx = HogQLParser.ColumnExprCallContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1000
                        if not self.precpred(self._ctx, 30):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 30)")
                        self.state = 1001
                        self.match(HogQLParser.LPAREN)
                        self.state = 1003
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                            self.state = 1002
                            self.columnExprList()


                        self.state = 1005
                        self.match(HogQLParser.RPAREN)
                        pass

                    elif la_ == 10:
                        localctx = HogQLParser.ColumnExprArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1006
                        if not self.precpred(self._ctx, 26):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 26)")
                        self.state = 1007
                        self.match(HogQLParser.LBRACKET)
                        self.state = 1008
                        self.columnExpr(0)
                        self.state = 1009
                        self.match(HogQLParser.RBRACKET)
                        pass

                    elif la_ == 11:
                        localctx = HogQLParser.ColumnExprTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1011
                        if not self.precpred(self._ctx, 25):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 25)")
                        self.state = 1012
                        self.match(HogQLParser.DOT)
                        self.state = 1013
                        self.match(HogQLParser.DECIMAL_LITERAL)
                        pass

                    elif la_ == 12:
                        localctx = HogQLParser.ColumnExprPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1014
                        if not self.precpred(self._ctx, 24):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 24)")
                        self.state = 1015
                        self.match(HogQLParser.DOT)
                        self.state = 1016
                        self.identifier()
                        pass

                    elif la_ == 13:
                        localctx = HogQLParser.ColumnExprNullArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1017
                        if not self.precpred(self._ctx, 23):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 23)")
                        self.state = 1018
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1019
                        self.match(HogQLParser.LBRACKET)
                        self.state = 1020
                        self.columnExpr(0)
                        self.state = 1021
                        self.match(HogQLParser.RBRACKET)
                        pass

                    elif la_ == 14:
                        localctx = HogQLParser.ColumnExprNullTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1023
                        if not self.precpred(self._ctx, 22):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 22)")
                        self.state = 1024
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1025
                        self.match(HogQLParser.DECIMAL_LITERAL)
                        pass

                    elif la_ == 15:
                        localctx = HogQLParser.ColumnExprNullPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1026
                        if not self.precpred(self._ctx, 21):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 21)")
                        self.state = 1027
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1028
                        self.identifier()
                        pass

                    elif la_ == 16:
                        localctx = HogQLParser.ColumnExprIsNullContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1029
                        if not self.precpred(self._ctx, 16):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 16)")
                        self.state = 1030
                        self.match(HogQLParser.IS)
                        self.state = 1032
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 1031
                            self.match(HogQLParser.NOT)


                        self.state = 1034
                        self.match(HogQLParser.NULL_SQL)
                        pass

                    elif la_ == 17:
                        localctx = HogQLParser.ColumnExprAliasContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1035
                        if not self.precpred(self._ctx, 9):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 9)")
                        self.state = 1040
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,128,self._ctx)
                        if la_ == 1:
                            self.state = 1036
                            self.match(HogQLParser.AS)
                            self.state = 1037
                            self.identifier()
                            pass

                        elif la_ == 2:
                            self.state = 1038
                            self.match(HogQLParser.AS)
                            self.state = 1039
                            self.match(HogQLParser.STRING_LITERAL)
                            pass


                        pass

             
                self.state = 1046
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,130,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class ColumnLambdaExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ARROW(self):
            return self.getToken(HogQLParser.ARROW, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnLambdaExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnLambdaExpr" ):
                return visitor.visitColumnLambdaExpr(self)
            else:
                return visitor.visitChildren(self)




    def columnLambdaExpr(self):

        localctx = HogQLParser.ColumnLambdaExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_columnLambdaExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1074
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,135,self._ctx)
            if la_ == 1:
                self.state = 1047
                self.match(HogQLParser.LPAREN)
                self.state = 1048
                self.identifier()
                self.state = 1053
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,131,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1049
                        self.match(HogQLParser.COMMA)
                        self.state = 1050
                        self.identifier() 
                    self.state = 1055
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,131,self._ctx)

                self.state = 1057
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 1056
                    self.match(HogQLParser.COMMA)


                self.state = 1059
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.state = 1061
                self.identifier()
                self.state = 1066
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,133,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1062
                        self.match(HogQLParser.COMMA)
                        self.state = 1063
                        self.identifier() 
                    self.state = 1068
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,133,self._ctx)

                self.state = 1070
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==117:
                    self.state = 1069
                    self.match(HogQLParser.COMMA)


                pass

            elif la_ == 3:
                self.state = 1072
                self.match(HogQLParser.LPAREN)
                self.state = 1073
                self.match(HogQLParser.RPAREN)
                pass


            self.state = 1076
            self.match(HogQLParser.ARROW)
            self.state = 1079
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,136,self._ctx)
            if la_ == 1:
                self.state = 1077
                self.columnExpr(0)
                pass

            elif la_ == 2:
                self.state = 1078
                self.block()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxTagElementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxTagElement

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class HogqlxTagElementClosedContext(HogqlxTagElementContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.HogqlxTagElementContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LT(self):
            return self.getToken(HogQLParser.LT, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)
        def GT(self):
            return self.getToken(HogQLParser.GT, 0)
        def hogqlxTagAttribute(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.HogqlxTagAttributeContext)
            else:
                return self.getTypedRuleContext(HogQLParser.HogqlxTagAttributeContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagElementClosed" ):
                return visitor.visitHogqlxTagElementClosed(self)
            else:
                return visitor.visitChildren(self)


    class HogqlxTagElementNestedContext(HogqlxTagElementContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.HogqlxTagElementContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LT(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LT)
            else:
                return self.getToken(HogQLParser.LT, i)
        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def GT(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.GT)
            else:
                return self.getToken(HogQLParser.GT, i)
        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)
        def hogqlxTagAttribute(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.HogqlxTagAttributeContext)
            else:
                return self.getTypedRuleContext(HogQLParser.HogqlxTagAttributeContext,i)

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagElementNested" ):
                return visitor.visitHogqlxTagElementNested(self)
            else:
                return visitor.visitChildren(self)



    def hogqlxTagElement(self):

        localctx = HogQLParser.HogqlxTagElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_hogqlxTagElement)
        self._la = 0 # Token type
        try:
            self.state = 1113
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,140,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.HogqlxTagElementClosedContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 1081
                self.match(HogQLParser.LT)
                self.state = 1082
                self.identifier()
                self.state = 1086
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1450176743603191810) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 6458554974207) != 0):
                    self.state = 1083
                    self.hogqlxTagAttribute()
                    self.state = 1088
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1089
                self.match(HogQLParser.SLASH)
                self.state = 1090
                self.match(HogQLParser.GT)
                pass

            elif la_ == 2:
                localctx = HogQLParser.HogqlxTagElementNestedContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 1092
                self.match(HogQLParser.LT)
                self.state = 1093
                self.identifier()
                self.state = 1097
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1450176743603191810) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 6458554974207) != 0):
                    self.state = 1094
                    self.hogqlxTagAttribute()
                    self.state = 1099
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1100
                self.match(HogQLParser.GT)
                self.state = 1106
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,139,self._ctx)
                if la_ == 1:
                    self.state = 1101
                    self.hogqlxTagElement()

                elif la_ == 2:
                    self.state = 1102
                    self.match(HogQLParser.LBRACE)
                    self.state = 1103
                    self.columnExpr(0)
                    self.state = 1104
                    self.match(HogQLParser.RBRACE)


                self.state = 1108
                self.match(HogQLParser.LT)
                self.state = 1109
                self.match(HogQLParser.SLASH)
                self.state = 1110
                self.identifier()
                self.state = 1111
                self.match(HogQLParser.GT)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxTagAttributeContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)


        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxTagAttribute

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagAttribute" ):
                return visitor.visitHogqlxTagAttribute(self)
            else:
                return visitor.visitChildren(self)




    def hogqlxTagAttribute(self):

        localctx = HogQLParser.HogqlxTagAttributeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_hogqlxTagAttribute)
        try:
            self.state = 1126
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,141,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1115
                self.identifier()
                self.state = 1116
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 1117
                self.string()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1119
                self.identifier()
                self.state = 1120
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 1121
                self.match(HogQLParser.LBRACE)
                self.state = 1122
                self.columnExpr(0)
                self.state = 1123
                self.match(HogQLParser.RBRACE)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1125
                self.identifier()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def withExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WithExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WithExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_withExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprList" ):
                return visitor.visitWithExprList(self)
            else:
                return visitor.visitChildren(self)




    def withExprList(self):

        localctx = HogQLParser.WithExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_withExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1128
            self.withExpr()
            self.state = 1133
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,142,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1129
                    self.match(HogQLParser.COMMA)
                    self.state = 1130
                    self.withExpr() 
                self.state = 1135
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,142,self._ctx)

            self.state = 1137
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==117:
                self.state = 1136
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_withExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class WithExprColumnContext(WithExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WithExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprColumn" ):
                return visitor.visitWithExprColumn(self)
            else:
                return visitor.visitChildren(self)


    class WithExprSubqueryContext(WithExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WithExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectUnionStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectUnionStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprSubquery" ):
                return visitor.visitWithExprSubquery(self)
            else:
                return visitor.visitChildren(self)



    def withExpr(self):

        localctx = HogQLParser.WithExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_withExpr)
        try:
            self.state = 1149
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,144,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.WithExprSubqueryContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 1139
                self.identifier()
                self.state = 1140
                self.match(HogQLParser.AS)
                self.state = 1141
                self.match(HogQLParser.LPAREN)
                self.state = 1142
                self.selectUnionStmt()
                self.state = 1143
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = HogQLParser.WithExprColumnContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 1145
                self.columnExpr(0)
                self.state = 1146
                self.match(HogQLParser.AS)
                self.state = 1147
                self.identifier()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def nestedIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.NestedIdentifierContext,0)


        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)


        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnIdentifier" ):
                return visitor.visitColumnIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def columnIdentifier(self):

        localctx = HogQLParser.ColumnIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_columnIdentifier)
        try:
            self.state = 1158
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [129]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1151
                self.placeholder()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99, 100, 102, 103, 104, 106]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1155
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,145,self._ctx)
                if la_ == 1:
                    self.state = 1152
                    self.tableIdentifier()
                    self.state = 1153
                    self.match(HogQLParser.DOT)


                self.state = 1157
                self.nestedIdentifier()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NestedIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.DOT)
            else:
                return self.getToken(HogQLParser.DOT, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_nestedIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNestedIdentifier" ):
                return visitor.visitNestedIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def nestedIdentifier(self):

        localctx = HogQLParser.NestedIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_nestedIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1160
            self.identifier()
            self.state = 1165
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,147,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1161
                    self.match(HogQLParser.DOT)
                    self.state = 1162
                    self.identifier() 
                self.state = 1167
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,147,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_tableExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class TableExprTagContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprTag" ):
                return visitor.visitTableExprTag(self)
            else:
                return visitor.visitChildren(self)


    class TableExprIdentifierContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprIdentifier" ):
                return visitor.visitTableExprIdentifier(self)
            else:
                return visitor.visitChildren(self)


    class TableExprPlaceholderContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprPlaceholder" ):
                return visitor.visitTableExprPlaceholder(self)
            else:
                return visitor.visitChildren(self)


    class TableExprSubqueryContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectUnionStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectUnionStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprSubquery" ):
                return visitor.visitTableExprSubquery(self)
            else:
                return visitor.visitChildren(self)


    class TableExprAliasContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableExprContext,0)

        def alias(self):
            return self.getTypedRuleContext(HogQLParser.AliasContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprAlias" ):
                return visitor.visitTableExprAlias(self)
            else:
                return visitor.visitChildren(self)


    class TableExprFunctionContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableFunctionExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableFunctionExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprFunction" ):
                return visitor.visitTableExprFunction(self)
            else:
                return visitor.visitChildren(self)



    def tableExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.TableExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 132
        self.enterRecursionRule(localctx, 132, self.RULE_tableExpr, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1177
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,148,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.TableExprIdentifierContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 1169
                self.tableIdentifier()
                pass

            elif la_ == 2:
                localctx = HogQLParser.TableExprFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1170
                self.tableFunctionExpr()
                pass

            elif la_ == 3:
                localctx = HogQLParser.TableExprSubqueryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1171
                self.match(HogQLParser.LPAREN)
                self.state = 1172
                self.selectUnionStmt()
                self.state = 1173
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = HogQLParser.TableExprTagContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1175
                self.hogqlxTagElement()
                pass

            elif la_ == 5:
                localctx = HogQLParser.TableExprPlaceholderContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1176
                self.placeholder()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 1187
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,150,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = HogQLParser.TableExprAliasContext(self, HogQLParser.TableExprContext(self, _parentctx, _parentState))
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_tableExpr)
                    self.state = 1179
                    if not self.precpred(self._ctx, 3):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                    self.state = 1183
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [20, 30, 40, 49, 106]:
                        self.state = 1180
                        self.alias()
                        pass
                    elif token in [6]:
                        self.state = 1181
                        self.match(HogQLParser.AS)
                        self.state = 1182
                        self.identifier()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 1189
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,150,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class TableFunctionExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def tableArgList(self):
            return self.getTypedRuleContext(HogQLParser.TableArgListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_tableFunctionExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableFunctionExpr" ):
                return visitor.visitTableFunctionExpr(self)
            else:
                return visitor.visitChildren(self)




    def tableFunctionExpr(self):

        localctx = HogQLParser.TableFunctionExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_tableFunctionExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1190
            self.identifier()
            self.state = 1191
            self.match(HogQLParser.LPAREN)
            self.state = 1193
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -9007270658588674) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 180986072486903807) != 0) or ((((_la - 129)) & ~0x3f) == 0 and ((1 << (_la - 129)) & 18455) != 0):
                self.state = 1192
                self.tableArgList()


            self.state = 1195
            self.match(HogQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def databaseIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.DatabaseIdentifierContext,0)


        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_tableIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableIdentifier" ):
                return visitor.visitTableIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def tableIdentifier(self):

        localctx = HogQLParser.TableIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_tableIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1200
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,152,self._ctx)
            if la_ == 1:
                self.state = 1197
                self.databaseIdentifier()
                self.state = 1198
                self.match(HogQLParser.DOT)


            self.state = 1202
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableArgListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_tableArgList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableArgList" ):
                return visitor.visitTableArgList(self)
            else:
                return visitor.visitChildren(self)




    def tableArgList(self):

        localctx = HogQLParser.TableArgListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_tableArgList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1204
            self.columnExpr(0)
            self.state = 1209
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,153,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1205
                    self.match(HogQLParser.COMMA)
                    self.state = 1206
                    self.columnExpr(0) 
                self.state = 1211
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,153,self._ctx)

            self.state = 1213
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==117:
                self.state = 1212
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DatabaseIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_databaseIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDatabaseIdentifier" ):
                return visitor.visitDatabaseIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def databaseIdentifier(self):

        localctx = HogQLParser.DatabaseIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_databaseIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1215
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FloatingLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FLOATING_LITERAL(self):
            return self.getToken(HogQLParser.FLOATING_LITERAL, 0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def DECIMAL_LITERAL(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.DECIMAL_LITERAL)
            else:
                return self.getToken(HogQLParser.DECIMAL_LITERAL, i)

        def OCTAL_LITERAL(self):
            return self.getToken(HogQLParser.OCTAL_LITERAL, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_floatingLiteral

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFloatingLiteral" ):
                return visitor.visitFloatingLiteral(self)
            else:
                return visitor.visitChildren(self)




    def floatingLiteral(self):

        localctx = HogQLParser.FloatingLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_floatingLiteral)
        self._la = 0 # Token type
        try:
            self.state = 1225
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [107]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1217
                self.match(HogQLParser.FLOATING_LITERAL)
                pass
            elif token in [121]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1218
                self.match(HogQLParser.DOT)
                self.state = 1219
                _la = self._input.LA(1)
                if not(_la==108 or _la==109):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [109]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1220
                self.match(HogQLParser.DECIMAL_LITERAL)
                self.state = 1221
                self.match(HogQLParser.DOT)
                self.state = 1223
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,155,self._ctx)
                if la_ == 1:
                    self.state = 1222
                    _la = self._input.LA(1)
                    if not(_la==108 or _la==109):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NumberLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def floatingLiteral(self):
            return self.getTypedRuleContext(HogQLParser.FloatingLiteralContext,0)


        def OCTAL_LITERAL(self):
            return self.getToken(HogQLParser.OCTAL_LITERAL, 0)

        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def HEXADECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.HEXADECIMAL_LITERAL, 0)

        def INF(self):
            return self.getToken(HogQLParser.INF, 0)

        def NAN_SQL(self):
            return self.getToken(HogQLParser.NAN_SQL, 0)

        def PLUS(self):
            return self.getToken(HogQLParser.PLUS, 0)

        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_numberLiteral

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNumberLiteral" ):
                return visitor.visitNumberLiteral(self)
            else:
                return visitor.visitChildren(self)




    def numberLiteral(self):

        localctx = HogQLParser.NumberLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_numberLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1228
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119 or _la==140:
                self.state = 1227
                _la = self._input.LA(1)
                if not(_la==119 or _la==140):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 1236
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,158,self._ctx)
            if la_ == 1:
                self.state = 1230
                self.floatingLiteral()
                pass

            elif la_ == 2:
                self.state = 1231
                self.match(HogQLParser.OCTAL_LITERAL)
                pass

            elif la_ == 3:
                self.state = 1232
                self.match(HogQLParser.DECIMAL_LITERAL)
                pass

            elif la_ == 4:
                self.state = 1233
                self.match(HogQLParser.HEXADECIMAL_LITERAL)
                pass

            elif la_ == 5:
                self.state = 1234
                self.match(HogQLParser.INF)
                pass

            elif la_ == 6:
                self.state = 1235
                self.match(HogQLParser.NAN_SQL)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def NULL_SQL(self):
            return self.getToken(HogQLParser.NULL_SQL, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_literal

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLiteral" ):
                return visitor.visitLiteral(self)
            else:
                return visitor.visitChildren(self)




    def literal(self):

        localctx = HogQLParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_literal)
        try:
            self.state = 1241
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [44, 58, 107, 108, 109, 110, 119, 121, 140]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1238
                self.numberLiteral()
                pass
            elif token in [111]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1239
                self.match(HogQLParser.STRING_LITERAL)
                pass
            elif token in [60]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1240
                self.match(HogQLParser.NULL_SQL)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IntervalContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SECOND(self):
            return self.getToken(HogQLParser.SECOND, 0)

        def MINUTE(self):
            return self.getToken(HogQLParser.MINUTE, 0)

        def HOUR(self):
            return self.getToken(HogQLParser.HOUR, 0)

        def DAY(self):
            return self.getToken(HogQLParser.DAY, 0)

        def WEEK(self):
            return self.getToken(HogQLParser.WEEK, 0)

        def MONTH(self):
            return self.getToken(HogQLParser.MONTH, 0)

        def QUARTER(self):
            return self.getToken(HogQLParser.QUARTER, 0)

        def YEAR(self):
            return self.getToken(HogQLParser.YEAR, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_interval

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitInterval" ):
                return visitor.visitInterval(self)
            else:
                return visitor.visitChildren(self)




    def interval(self):

        localctx = HogQLParser.IntervalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_interval)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1243
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 216173331871694848) != 0) or ((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & 8724152577) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeywordContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def ANTI(self):
            return self.getToken(HogQLParser.ANTI, 0)

        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)

        def ARRAY(self):
            return self.getToken(HogQLParser.ARRAY, 0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)

        def ASCENDING(self):
            return self.getToken(HogQLParser.ASCENDING, 0)

        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)

        def BOTH(self):
            return self.getToken(HogQLParser.BOTH, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def CASE(self):
            return self.getToken(HogQLParser.CASE, 0)

        def CAST(self):
            return self.getToken(HogQLParser.CAST, 0)

        def COHORT(self):
            return self.getToken(HogQLParser.COHORT, 0)

        def COLLATE(self):
            return self.getToken(HogQLParser.COLLATE, 0)

        def CROSS(self):
            return self.getToken(HogQLParser.CROSS, 0)

        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def CURRENT(self):
            return self.getToken(HogQLParser.CURRENT, 0)

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)

        def DESC(self):
            return self.getToken(HogQLParser.DESC, 0)

        def DESCENDING(self):
            return self.getToken(HogQLParser.DESCENDING, 0)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)

        def END(self):
            return self.getToken(HogQLParser.END, 0)

        def EXTRACT(self):
            return self.getToken(HogQLParser.EXTRACT, 0)

        def FINAL(self):
            return self.getToken(HogQLParser.FINAL, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def FOLLOWING(self):
            return self.getToken(HogQLParser.FOLLOWING, 0)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)

        def FULL(self):
            return self.getToken(HogQLParser.FULL, 0)

        def GROUP(self):
            return self.getToken(HogQLParser.GROUP, 0)

        def HAVING(self):
            return self.getToken(HogQLParser.HAVING, 0)

        def ID(self):
            return self.getToken(HogQLParser.ID, 0)

        def IS(self):
            return self.getToken(HogQLParser.IS, 0)

        def IF(self):
            return self.getToken(HogQLParser.IF, 0)

        def ILIKE(self):
            return self.getToken(HogQLParser.ILIKE, 0)

        def IN(self):
            return self.getToken(HogQLParser.IN, 0)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)

        def INTERVAL(self):
            return self.getToken(HogQLParser.INTERVAL, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def KEY(self):
            return self.getToken(HogQLParser.KEY, 0)

        def LAST(self):
            return self.getToken(HogQLParser.LAST, 0)

        def LEADING(self):
            return self.getToken(HogQLParser.LEADING, 0)

        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)

        def LIKE(self):
            return self.getToken(HogQLParser.LIKE, 0)

        def LIMIT(self):
            return self.getToken(HogQLParser.LIMIT, 0)

        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def NULLS(self):
            return self.getToken(HogQLParser.NULLS, 0)

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def ON(self):
            return self.getToken(HogQLParser.ON, 0)

        def OR(self):
            return self.getToken(HogQLParser.OR, 0)

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)

        def PARTITION(self):
            return self.getToken(HogQLParser.PARTITION, 0)

        def PRECEDING(self):
            return self.getToken(HogQLParser.PRECEDING, 0)

        def PREWHERE(self):
            return self.getToken(HogQLParser.PREWHERE, 0)

        def RANGE(self):
            return self.getToken(HogQLParser.RANGE, 0)

        def RETURN(self):
            return self.getToken(HogQLParser.RETURN, 0)

        def RIGHT(self):
            return self.getToken(HogQLParser.RIGHT, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def ROW(self):
            return self.getToken(HogQLParser.ROW, 0)

        def ROWS(self):
            return self.getToken(HogQLParser.ROWS, 0)

        def SAMPLE(self):
            return self.getToken(HogQLParser.SAMPLE, 0)

        def SELECT(self):
            return self.getToken(HogQLParser.SELECT, 0)

        def SEMI(self):
            return self.getToken(HogQLParser.SEMI, 0)

        def SETTINGS(self):
            return self.getToken(HogQLParser.SETTINGS, 0)

        def SUBSTRING(self):
            return self.getToken(HogQLParser.SUBSTRING, 0)

        def THEN(self):
            return self.getToken(HogQLParser.THEN, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def TIMESTAMP(self):
            return self.getToken(HogQLParser.TIMESTAMP, 0)

        def TOTALS(self):
            return self.getToken(HogQLParser.TOTALS, 0)

        def TRAILING(self):
            return self.getToken(HogQLParser.TRAILING, 0)

        def TRIM(self):
            return self.getToken(HogQLParser.TRIM, 0)

        def TRUNCATE(self):
            return self.getToken(HogQLParser.TRUNCATE, 0)

        def TO(self):
            return self.getToken(HogQLParser.TO, 0)

        def TOP(self):
            return self.getToken(HogQLParser.TOP, 0)

        def UNBOUNDED(self):
            return self.getToken(HogQLParser.UNBOUNDED, 0)

        def UNION(self):
            return self.getToken(HogQLParser.UNION, 0)

        def USING(self):
            return self.getToken(HogQLParser.USING, 0)

        def WHEN(self):
            return self.getToken(HogQLParser.WHEN, 0)

        def WHERE(self):
            return self.getToken(HogQLParser.WHERE, 0)

        def WINDOW(self):
            return self.getToken(HogQLParser.WINDOW, 0)

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_keyword

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKeyword" ):
                return visitor.visitKeyword(self)
            else:
                return visitor.visitChildren(self)




    def keyword(self):

        localctx = HogQLParser.KeywordContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_keyword)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1245
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & -1666350075474886658) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 943816933247) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeywordForAliasContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def ID(self):
            return self.getToken(HogQLParser.ID, 0)

        def KEY(self):
            return self.getToken(HogQLParser.KEY, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_keywordForAlias

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKeywordForAlias" ):
                return visitor.visitKeywordForAlias(self)
            else:
                return visitor.visitChildren(self)




    def keywordForAlias(self):

        localctx = HogQLParser.KeywordForAliasContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_keywordForAlias)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1247
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 564050539839488) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AliasContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IDENTIFIER(self):
            return self.getToken(HogQLParser.IDENTIFIER, 0)

        def keywordForAlias(self):
            return self.getTypedRuleContext(HogQLParser.KeywordForAliasContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_alias

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAlias" ):
                return visitor.visitAlias(self)
            else:
                return visitor.visitChildren(self)




    def alias(self):

        localctx = HogQLParser.AliasContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_alias)
        try:
            self.state = 1251
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [106]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1249
                self.match(HogQLParser.IDENTIFIER)
                pass
            elif token in [20, 30, 40, 49]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1250
                self.keywordForAlias()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IDENTIFIER(self):
            return self.getToken(HogQLParser.IDENTIFIER, 0)

        def interval(self):
            return self.getTypedRuleContext(HogQLParser.IntervalContext,0)


        def keyword(self):
            return self.getTypedRuleContext(HogQLParser.KeywordContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_identifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIdentifier" ):
                return visitor.visitIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def identifier(self):

        localctx = HogQLParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_identifier)
        try:
            self.state = 1256
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [106]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1253
                self.match(HogQLParser.IDENTIFIER)
                pass
            elif token in [21, 39, 56, 57, 71, 79, 98, 104]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1254
                self.interval()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 37, 38, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 99, 100, 102, 103]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1255
                self.keyword()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumValueContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_enumValue

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEnumValue" ):
                return visitor.visitEnumValue(self)
            else:
                return visitor.visitChildren(self)




    def enumValue(self):

        localctx = HogQLParser.EnumValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_enumValue)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1258
            self.string()
            self.state = 1259
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 1260
            self.numberLiteral()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PlaceholderContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def nestedIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.NestedIdentifierContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_placeholder

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPlaceholder" ):
                return visitor.visitPlaceholder(self)
            else:
                return visitor.visitChildren(self)




    def placeholder(self):

        localctx = HogQLParser.PlaceholderContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_placeholder)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1262
            self.match(HogQLParser.LBRACE)
            self.state = 1263
            self.nestedIdentifier()
            self.state = 1264
            self.match(HogQLParser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def templateString(self):
            return self.getTypedRuleContext(HogQLParser.TemplateStringContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_string

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitString" ):
                return visitor.visitString(self)
            else:
                return visitor.visitChildren(self)




    def string(self):

        localctx = HogQLParser.StringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_string)
        try:
            self.state = 1268
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [111]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1266
                self.match(HogQLParser.STRING_LITERAL)
                pass
            elif token in [143]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1267
                self.templateString()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TemplateStringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def QUOTE_SINGLE_TEMPLATE(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE_TEMPLATE, 0)

        def QUOTE_SINGLE(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE, 0)

        def stringContents(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StringContentsContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StringContentsContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_templateString

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTemplateString" ):
                return visitor.visitTemplateString(self)
            else:
                return visitor.visitChildren(self)




    def templateString(self):

        localctx = HogQLParser.TemplateStringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_templateString)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1270
            self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE)
            self.state = 1274
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==157 or _la==158:
                self.state = 1271
                self.stringContents()
                self.state = 1276
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1277
            self.match(HogQLParser.QUOTE_SINGLE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContentsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def STRING_ESCAPE_TRIGGER(self):
            return self.getToken(HogQLParser.STRING_ESCAPE_TRIGGER, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def STRING_TEXT(self):
            return self.getToken(HogQLParser.STRING_TEXT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_stringContents

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStringContents" ):
                return visitor.visitStringContents(self)
            else:
                return visitor.visitChildren(self)




    def stringContents(self):

        localctx = HogQLParser.StringContentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_stringContents)
        try:
            self.state = 1284
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [158]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1279
                self.match(HogQLParser.STRING_ESCAPE_TRIGGER)
                self.state = 1280
                self.columnExpr(0)
                self.state = 1281
                self.match(HogQLParser.RBRACE)
                pass
            elif token in [157]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1283
                self.match(HogQLParser.STRING_TEXT)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FullTemplateStringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def QUOTE_SINGLE_TEMPLATE_FULL(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE_TEMPLATE_FULL, 0)

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def stringContentsFull(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StringContentsFullContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StringContentsFullContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_fullTemplateString

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFullTemplateString" ):
                return visitor.visitFullTemplateString(self)
            else:
                return visitor.visitChildren(self)




    def fullTemplateString(self):

        localctx = HogQLParser.FullTemplateStringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_fullTemplateString)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1286
            self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE_FULL)
            self.state = 1290
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==159 or _la==160:
                self.state = 1287
                self.stringContentsFull()
                self.state = 1292
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1293
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContentsFullContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FULL_STRING_ESCAPE_TRIGGER(self):
            return self.getToken(HogQLParser.FULL_STRING_ESCAPE_TRIGGER, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def FULL_STRING_TEXT(self):
            return self.getToken(HogQLParser.FULL_STRING_TEXT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_stringContentsFull

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStringContentsFull" ):
                return visitor.visitStringContentsFull(self)
            else:
                return visitor.visitChildren(self)




    def stringContentsFull(self):

        localctx = HogQLParser.StringContentsFullContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_stringContentsFull)
        try:
            self.state = 1300
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [160]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1295
                self.match(HogQLParser.FULL_STRING_ESCAPE_TRIGGER)
                self.state = 1296
                self.columnExpr(0)
                self.state = 1297
                self.match(HogQLParser.RBRACE)
                pass
            elif token in [159]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1299
                self.match(HogQLParser.FULL_STRING_TEXT)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[39] = self.joinExpr_sempred
        self._predicates[58] = self.columnExpr_sempred
        self._predicates[66] = self.tableExpr_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def joinExpr_sempred(self, localctx:JoinExprContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 4)
         

    def columnExpr_sempred(self, localctx:ColumnExprContext, predIndex:int):
            if predIndex == 2:
                return self.precpred(self._ctx, 19)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 18)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 17)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 15)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 13)
         

            if predIndex == 7:
                return self.precpred(self._ctx, 12)
         

            if predIndex == 8:
                return self.precpred(self._ctx, 11)
         

            if predIndex == 9:
                return self.precpred(self._ctx, 10)
         

            if predIndex == 10:
                return self.precpred(self._ctx, 30)
         

            if predIndex == 11:
                return self.precpred(self._ctx, 26)
         

            if predIndex == 12:
                return self.precpred(self._ctx, 25)
         

            if predIndex == 13:
                return self.precpred(self._ctx, 24)
         

            if predIndex == 14:
                return self.precpred(self._ctx, 23)
         

            if predIndex == 15:
                return self.precpred(self._ctx, 22)
         

            if predIndex == 16:
                return self.precpred(self._ctx, 21)
         

            if predIndex == 17:
                return self.precpred(self._ctx, 16)
         

            if predIndex == 18:
                return self.precpred(self._ctx, 9)
         

    def tableExpr_sempred(self, localctx:TableExprContext, predIndex:int):
            if predIndex == 19:
                return self.precpred(self._ctx, 3)
         




